Compare commits
7 Commits
0a3721a82a
...
1e0c200466
| Author | SHA1 | Date | |
|---|---|---|---|
| 1e0c200466 | |||
| 5c274b005d | |||
|
|
306c82e04c | ||
|
|
91164cf44f | ||
|
|
5237000699 | ||
|
|
98c2e43f6f | ||
|
|
8e3a12f62a |
|
|
@ -378,4 +378,4 @@ function hide_chantiers_menu()
|
|||
|
||||
remove_menu_page('edit.php?post_type=chantiers');
|
||||
}
|
||||
add_action('admin_menu', 'hide_chantiers_menu', 999);
|
||||
// add_action('admin_menu', 'hide_chantiers_menu', 999);
|
||||
|
|
|
|||
|
|
@ -67,10 +67,10 @@ function metiers_patrimoine_artisans_handle_posts_custom_columns($column)
|
|||
$conseiller = get_field('conseiller', $post_id);
|
||||
if (!isset($conseiller)) return;
|
||||
|
||||
$conseillerDatas = get_userdata($conseiller);
|
||||
if (!isset($conseillerDatas->display_name)) return;
|
||||
// $conseillerDatas = get_userdata($conseiller);
|
||||
// if (!isset($conseillerDatas->display_name)) return;
|
||||
|
||||
echo $conseillerDatas->display_name;
|
||||
echo $conseiller['display_name'];
|
||||
}
|
||||
if ($column == 'state') {
|
||||
$status = get_post_status($post_id);
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 93 KiB |
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
$postID = $args['post_ID'];
|
||||
$post_thumbnail = get_the_post_thumbnail($postID, 'full', array('class' => 'card-artisans__thumbnail card-post__thumbnail')) ?? null;
|
||||
$postDefautlThumbnail = get_stylesheet_directory_uri() . '/resources/img/photos/default-cover.jpg';
|
||||
$postDefautlThumbnail = get_stylesheet_directory_uri() . '/resources/img/illustrations/Homegrade-metier-du-patrimoine-artisan-vignette.jpg';
|
||||
|
||||
$post_title = $args['post_title'];
|
||||
$post_permalink = get_the_permalink($postID);
|
||||
|
|
@ -27,6 +27,8 @@ write_log($cover_image);
|
|||
<?php echo $post_thumbnail ?>
|
||||
<?php if ($cover_image): ?>
|
||||
<img src="<?php echo $cover_image['url'] ?>" alt="<?php echo $post_title ?>" class="card-artisans__cover-image">
|
||||
<?php else: ?>
|
||||
<img src="<?php echo $postDefautlThumbnail ?>" alt="<?php echo $post_title ?>" class="card-artisans__cover-image">
|
||||
<?php endif; ?>
|
||||
<div class="card-artisans__inner">
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
$postID = $args['post_ID'];
|
||||
$post_thumbnail = get_the_post_thumbnail($postID, 'full', array('class' => 'card-artisans__thumbnail card-post__thumbnail')) ?? null;
|
||||
$postDefautlThumbnail = get_stylesheet_directory_uri() . '/resources/img/illustrations/Homegrade-metier-du-patrimoine-artisan-vignette.jpg';
|
||||
|
||||
$post_title = $args['post_title'];
|
||||
$company_members = get_field('company_members', $postID);
|
||||
|
|
@ -23,6 +24,8 @@ $cover_image = get_field('artisan_cover', $postID);
|
|||
<?php echo $post_thumbnail ?>
|
||||
<?php if ($cover_image): ?>
|
||||
<img src="<?php echo $cover_image['url'] ?>" alt="<?php echo $post_title ?>" class="card-artisans__cover-image">
|
||||
<?php else: ?>
|
||||
<img src="<?php echo $postDefautlThumbnail ?>" alt="<?php echo $post_title ?>" class="card-artisans__cover-image">
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ $not_found_message = $args['not_found_message'] ?? "";
|
|||
$queryAllUnaffectedArtisansByStatus = array(
|
||||
'post_type' => 'artisans',
|
||||
'posts_per_page' => -1,
|
||||
'post_status' => array('publish', 'offline'),
|
||||
'meta_query' => array(
|
||||
'relation' => 'AND',
|
||||
array(
|
||||
|
|
@ -49,6 +50,7 @@ $queryAllUnaffectedArtisansByStatus = array(
|
|||
$queryConseillerRelatedArtisansByStatus = array(
|
||||
'post_type' => 'artisans',
|
||||
'posts_per_page' => -1,
|
||||
'post_status' => array('publish', 'offline'),
|
||||
'meta_key' => 'conseiller',
|
||||
'meta_value' => $current_user_id,
|
||||
'meta_query' => array(
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ $current_user = wp_get_current_user();
|
|||
|
||||
$args = array(
|
||||
'post_type' => 'artisans',
|
||||
'post_status' => array('publish', 'offline'),
|
||||
'meta_key' => 'conseiller',
|
||||
'meta_value' => $current_user->ID,
|
||||
'posts_per_page' => -1
|
||||
|
|
@ -34,7 +35,7 @@ $current_user = wp_get_current_user();
|
|||
<div class="total-attached">
|
||||
<p> Artisans associés : <?php echo count($user_attached_artisans->posts) ?></p>
|
||||
</div>
|
||||
<div class="required-actions">
|
||||
<!-- <div class="required-actions">
|
||||
<?php
|
||||
$total = count($required_actions_artisans->posts);
|
||||
?>
|
||||
|
|
@ -59,7 +60,7 @@ $current_user = wp_get_current_user();
|
|||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<a class="cta cta--button" href="<?php echo home_url('/wp-admin/admin.php?page=gestion-artisans') ?>">Pannel de gestion</a>
|
||||
<a class="cta cta--button" href="<?php echo home_url('/wp-admin/admin.php?page=gestion-artisans') ?>">Panel de gestion</a>
|
||||
<?php
|
||||
Loading…
Reference in New Issue
Block a user