Compare commits
No commits in common. "b23ef366cea8034b749a5f95697828640036faf2" and "785b252720d1afa456cfbe5faf69fcacc204b95d" have entirely different histories.
b23ef366ce
...
785b252720
|
|
@ -492,22 +492,16 @@ function carhop_get_post_card_link_according_to_post_datas($post_id, $card_args
|
||||||
case 'analyses-etudes':
|
case 'analyses-etudes':
|
||||||
$type_analyse_etude = get_the_terms($post_id, 'type-analyse-etude')[0] ?? null;
|
$type_analyse_etude = get_the_terms($post_id, 'type-analyse-etude')[0] ?? null;
|
||||||
|
|
||||||
|
|
||||||
if ($type_analyse_etude->slug === 'analyse') {
|
if ($type_analyse_etude->slug === 'analyse') {
|
||||||
$link_type = get_field('link_type', $post_id);
|
$link_type = get_field('link_type', $post_id);
|
||||||
|
|
||||||
switch ($link_type) {
|
switch ($link_type) {
|
||||||
case 'pdf':
|
case 'pdf':
|
||||||
$pdf = get_field('pdf', $post_id);
|
$pdf = get_field('pdf', $post_id);
|
||||||
|
|
||||||
if (is_array($pdf) && ! empty($pdf['url'])) {
|
if (is_array($pdf) && ! empty($pdf['url'])) {
|
||||||
$link = $pdf['url'];
|
$link = $pdf['url'];
|
||||||
$target = '_blank';
|
$target = '_blank';
|
||||||
$is_external = true;
|
$is_external = true;
|
||||||
} else {
|
|
||||||
$link = '';
|
|
||||||
$target = '_self';
|
|
||||||
$is_external = false;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'link':
|
case 'link':
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ $currentPostType = get_post_type();
|
||||||
$shareUrls = build_share_urls();
|
$shareUrls = build_share_urls();
|
||||||
$handleCitation = post_type_supports($currentPostType, 'carhop-citations') ?? false;
|
$handleCitation = post_type_supports($currentPostType, 'carhop-citations') ?? false;
|
||||||
$citeReference = get_field('cite_reference', get_the_ID());
|
$citeReference = get_field('cite_reference', get_the_ID());
|
||||||
|
// write_log($handleCitation);
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user