Mostrar el evangelio también en Comentario editorial (no solo Comentarios al evangelio) #207

Merged
rafa merged 1 commits from feat/evangelio-editorial into main 2026-08-12 13:53:41 +00:00
2 changed files with 6 additions and 2 deletions
Showing only changes of commit 754915b91f - Show all commits
+5 -1
View File
@@ -9,8 +9,12 @@ function fea_evangelio_category($es_id) {
return function_exists('fea_cat') ? (int) fea_cat($es_id) : (int) $es_id;
}
function fea_evangelio_comment_categories() {
return array_map('fea_evangelio_category', [1647, 1646]);
}
function fea_evangelio_is_comment($post_id) {
return has_category(fea_evangelio_category(1647), $post_id);
return has_category(fea_evangelio_comment_categories(), $post_id);
}
/** Lee el meta del comentario; las traducciones heredan el dato editorial del original ES. */
+1 -1
View File
@@ -5,7 +5,7 @@
$apply = in_array('--apply', $_SERVER['argv'] ?? [], true);
$posts = get_posts([
'post_type' => 'post', 'post_status' => 'publish', 'posts_per_page' => -1,
'category__in' => [fea_evangelio_category(1647)],
'category__in' => fea_evangelio_comment_categories(),
'meta_query' => [['key' => '_cita_evangelio', 'compare' => 'NOT EXISTS']],
'orderby' => 'date', 'order' => 'ASC',
]);