Compare commits
No commits in common. "1a2d2708ef744b47d755c53f1d4a7c25b6155230" and "e29b55fb6163b196b32c8fbac9f2f7ebd89ca366" have entirely different histories.
1a2d2708ef
...
e29b55fb61
|
|
@ -3,7 +3,8 @@ $align = isset($attributes['align']) ? $attributes['align'] : '';
|
||||||
$link = isset($attributes['link']) ? $attributes['link'] : [];
|
$link = isset($attributes['link']) ? $attributes['link'] : [];
|
||||||
$text = isset($attributes['text']) ? $attributes['text'] : '';
|
$text = isset($attributes['text']) ? $attributes['text'] : '';
|
||||||
$color = isset($attributes['color']) ? $attributes['color'] : '';
|
$color = isset($attributes['color']) ? $attributes['color'] : '';
|
||||||
$target = (isset($link['opensInNewTab']) && $link['opensInNewTab']) ? '_blank' : '_self';
|
$target = isset($link) && $link['opensInNewTab'] ? '_blank' : '_self';
|
||||||
|
|
||||||
$raw_url = isset($link['url']) ? $link['url'] : '';
|
$raw_url = isset($link['url']) ? $link['url'] : '';
|
||||||
$is_inner_page_link = is_string($raw_url) && strpos($raw_url, '#') === 0;
|
$is_inner_page_link = is_string($raw_url) && strpos($raw_url, '#') === 0;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,18 +37,24 @@ $post_count = $query->found_posts;
|
||||||
<?php if ($query->have_posts()) : ?>
|
<?php if ($query->have_posts()) : ?>
|
||||||
<div class="dbmob-grid">
|
<div class="dbmob-grid">
|
||||||
<?php while ($query->have_posts()) : $query->the_post(); ?>
|
<?php while ($query->have_posts()) : $query->the_post(); ?>
|
||||||
|
<?php $maitron_url = get_field('maitron_url', get_the_ID()); ?>
|
||||||
|
|
||||||
<?php get_template_part('template-parts/components/cards/post-card', null, array(
|
<?php get_template_part('template-parts/components/cards/post-card', null, array(
|
||||||
'ID' => get_the_ID(),
|
'ID' => get_the_ID(),
|
||||||
'current_post_type' => 'dbmob',
|
'current_post_type' => 'dbmob',
|
||||||
|
'has_external_link' => isset($maitron_url) && !empty($maitron_url),
|
||||||
|
'external_link' => $maitron_url,
|
||||||
|
'external_link_text' => 'Voir la notice',
|
||||||
)); ?>
|
)); ?>
|
||||||
<?php endwhile; ?>
|
<?php endwhile; ?>
|
||||||
</div>
|
</ul>
|
||||||
|
<?php endif; ?>
|
||||||
<?php wp_reset_postdata(); ?>
|
<?php wp_reset_postdata(); ?>
|
||||||
<?php endif; ?>
|
</div>
|
||||||
|
|
||||||
<?php if ($post_count > $initialPostDisplayAmount) : ?>
|
<?php if ($post_count > $initialPostDisplayAmount) : ?>
|
||||||
<button class="load-more-button" data-offset="0" data-posts-per-page="-1">Afficher plus</button>
|
<button class="load-more-button" data-offset="0" data-posts-per-page="-1">Afficher plus</button>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,8 @@ $align = isset($attributes['align']) ? $attributes['align'] : '';
|
||||||
$link = isset($attributes['link']) ? $attributes['link'] : [];
|
$link = isset($attributes['link']) ? $attributes['link'] : [];
|
||||||
$text = isset($attributes['text']) ? $attributes['text'] : '';
|
$text = isset($attributes['text']) ? $attributes['text'] : '';
|
||||||
$color = isset($attributes['color']) ? $attributes['color'] : '';
|
$color = isset($attributes['color']) ? $attributes['color'] : '';
|
||||||
$target = (isset($link['opensInNewTab']) && $link['opensInNewTab']) ? '_blank' : '_self';
|
$target = isset($link) && $link['opensInNewTab'] ? '_blank' : '_self';
|
||||||
|
|
||||||
$raw_url = isset($link['url']) ? $link['url'] : '';
|
$raw_url = isset($link['url']) ? $link['url'] : '';
|
||||||
$is_inner_page_link = is_string($raw_url) && strpos($raw_url, '#') === 0;
|
$is_inner_page_link = is_string($raw_url) && strpos($raw_url, '#') === 0;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,18 +37,24 @@ $post_count = $query->found_posts;
|
||||||
<?php if ($query->have_posts()) : ?>
|
<?php if ($query->have_posts()) : ?>
|
||||||
<div class="dbmob-grid">
|
<div class="dbmob-grid">
|
||||||
<?php while ($query->have_posts()) : $query->the_post(); ?>
|
<?php while ($query->have_posts()) : $query->the_post(); ?>
|
||||||
|
<?php $maitron_url = get_field('maitron_url', get_the_ID()); ?>
|
||||||
|
|
||||||
<?php get_template_part('template-parts/components/cards/post-card', null, array(
|
<?php get_template_part('template-parts/components/cards/post-card', null, array(
|
||||||
'ID' => get_the_ID(),
|
'ID' => get_the_ID(),
|
||||||
'current_post_type' => 'dbmob',
|
'current_post_type' => 'dbmob',
|
||||||
|
'has_external_link' => isset($maitron_url) && !empty($maitron_url),
|
||||||
|
'external_link' => $maitron_url,
|
||||||
|
'external_link_text' => 'Voir la notice',
|
||||||
)); ?>
|
)); ?>
|
||||||
<?php endwhile; ?>
|
<?php endwhile; ?>
|
||||||
</div>
|
</ul>
|
||||||
|
<?php endif; ?>
|
||||||
<?php wp_reset_postdata(); ?>
|
<?php wp_reset_postdata(); ?>
|
||||||
<?php endif; ?>
|
</div>
|
||||||
|
|
||||||
<?php if ($post_count > $initialPostDisplayAmount) : ?>
|
<?php if ($post_count > $initialPostDisplayAmount) : ?>
|
||||||
<button class="load-more-button" data-offset="0" data-posts-per-page="-1">Afficher plus</button>
|
<button class="load-more-button" data-offset="0" data-posts-per-page="-1">Afficher plus</button>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user