Compare commits
7 Commits
33a45ca334
...
317cc41ce4
| Author | SHA1 | Date | |
|---|---|---|---|
| 317cc41ce4 | |||
| 1baeaf5cad | |||
| 2532af9358 | |||
| dbf190282d | |||
| de9c2d1bd4 | |||
| 086163521e | |||
| 5125ad8032 |
|
|
@ -46,7 +46,7 @@ add_action('edit_form_after_title', function () {
|
|||
</div>
|
||||
|
||||
<div class="state-container">
|
||||
<p>Statut :</p>
|
||||
<p>Statut de travail :</p>
|
||||
<?php if (isset($status_mdp) && isset($status_mdp['value']) && isset($status_mdp['label'])): ?>
|
||||
<span class="status-state status-state--<?php echo $status_mdp['value']; ?> "><?php echo $status_mdp['label']; ?></span>
|
||||
<?php else : ?>
|
||||
|
|
@ -85,7 +85,7 @@ add_action('edit_form_after_title', function () {
|
|||
add_action('add_meta_boxes', function () {
|
||||
add_meta_box(
|
||||
'admin_artisan_chantier_list',
|
||||
'Chantiers réalisé par l\'entreprise',
|
||||
'Chantiers réalisés',
|
||||
'render_custom_chantier_box_content',
|
||||
'artisans',
|
||||
'normal',
|
||||
|
|
@ -125,6 +125,7 @@ function render_custom_chantier_box_content($post)
|
|||
echo '<li><a href="' . get_edit_post_link() . '"> <img src=' . get_stylesheet_directory_uri() . '/resources/img/icons/document-inspect.svg' . ' /> ' . $chantier_name . '</a></li>';
|
||||
}
|
||||
echo '</ul>';
|
||||
echo '<a href="' . admin_url('post-new.php?post_type=chantiers') . '" class="new-chantier">Ajouter un chantier</a>';
|
||||
} else {
|
||||
echo '<h3> Chantiers réalisés</h3>';
|
||||
echo '<p class="no-results">Aucun chantier pour cette entreprise</p>';
|
||||
|
|
@ -162,7 +163,7 @@ function set_user_metabox_order($user_id)
|
|||
];
|
||||
update_user_meta($user_id, 'meta-box-order_artisans', $new_order);
|
||||
|
||||
if ($metaboxes_hidden === false) return;
|
||||
if ($metaboxes_hidden === false || !is_array($metaboxes_hidden)) return;
|
||||
|
||||
$newArrray = array_merge($metaboxes_hidden, ['postimagediv', 'icldiv']);
|
||||
update_user_meta($user_id, 'metaboxhidden_artisans', $newArrray);
|
||||
|
|
@ -243,6 +244,3 @@ function add_last_modified_date_to_publish_box()
|
|||
|
||||
|
||||
// post_submit_meta_box($post, array('side' => 'core'));
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -16,10 +16,10 @@ $use_current_user = isset($_GET['use-current-user']) ? $_GET['use-current-user']
|
|||
|
||||
<div class="filters">
|
||||
<a href="<?php echo add_query_arg('use-current-user', '1', $_SERVER['REQUEST_URI']); ?>" class="button <?php echo $use_current_user ? 'filter-active' : ''; ?>">
|
||||
Artisans de <?php echo $user_name ?>
|
||||
Artisans de <?php echo $user_name ?> avec action requis
|
||||
</a>
|
||||
<a href="<?php echo add_query_arg('use-current-user', '0', $_SERVER['REQUEST_URI']); ?>" class="button <?php echo !$use_current_user ? 'filter-active' : ''; ?> ">
|
||||
Artisans non attribués
|
||||
Artisans non attribués avec action requis
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user