FIX Update handling of 'revue' column in articles to display a placeholder when no related revue is set.
This commit is contained in:
parent
f30f8efa74
commit
d6938cea56
|
|
@ -33,10 +33,12 @@ function carhop_articles_handle_posts_custom_columns($column)
|
||||||
|
|
||||||
if ($column == 'revue') {
|
if ($column == 'revue') {
|
||||||
$revue_id = get_field('related_revue', $post_id);
|
$revue_id = get_field('related_revue', $post_id);
|
||||||
if (!isset($revue_id)) return;
|
if (!isset($revue_id)) {
|
||||||
|
echo '—';
|
||||||
|
} else {
|
||||||
$revue_title = get_the_title($revue_id);
|
$revue_title = get_the_title($revue_id);
|
||||||
echo $revue_title;
|
echo $revue_title;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
add_action('manage_articles_posts_custom_column', 'carhop_articles_handle_posts_custom_columns', 10, 2);
|
add_action('manage_articles_posts_custom_column', 'carhop_articles_handle_posts_custom_columns', 10, 2);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user