From 754915b91f85a9c5e09e39044fae89c603cb1773 Mon Sep 17 00:00:00 2001 From: rafa Date: Wed, 12 Aug 2026 09:30:43 -0400 Subject: [PATCH] feat: show gospel in editorial comments Co-authored-by: rafa Signed-off-by: rafa --- mu-plugins/fea-evangelio-comentarios.php | 6 +++++- scripts/backfill_evangelio_meta.php | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/mu-plugins/fea-evangelio-comentarios.php b/mu-plugins/fea-evangelio-comentarios.php index bd00496..5294a37 100644 --- a/mu-plugins/fea-evangelio-comentarios.php +++ b/mu-plugins/fea-evangelio-comentarios.php @@ -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. */ diff --git a/scripts/backfill_evangelio_meta.php b/scripts/backfill_evangelio_meta.php index 28ff038..5096491 100644 --- a/scripts/backfill_evangelio_meta.php +++ b/scripts/backfill_evangelio_meta.php @@ -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', ]); -- 2.52.0