fix: asegurar despliegue del calendario litúrgico
This commit is contained in:
@@ -1259,6 +1259,23 @@ add_shortcode('fea_evangelio_diario', function($atts) {
|
||||
return $id ? get_post((int) $id) : null;
|
||||
};
|
||||
$video = $find_video();
|
||||
// Hasta que el importador instale el JSON y reindexe, conservar el contenido
|
||||
// civil heredado evita dejar la pestaña de texto en blanco durante el despliegue.
|
||||
if (!$texto && !$book_index) {
|
||||
$legacy_text = function() use ($titulo_dia) {
|
||||
global $wpdb;
|
||||
$id = $wpdb->get_var($wpdb->prepare(
|
||||
"SELECT p.ID FROM {$wpdb->posts} p
|
||||
JOIN {$wpdb->term_relationships} tr ON tr.object_id = p.ID
|
||||
JOIN {$wpdb->term_taxonomy} tt ON tt.term_taxonomy_id = tr.term_taxonomy_id
|
||||
WHERE tt.taxonomy = 'category' AND tt.term_id = 14
|
||||
AND p.post_type = 'post' AND p.post_status = 'publish'
|
||||
AND LOWER(TRIM(p.post_title)) = %s
|
||||
ORDER BY p.ID ASC LIMIT 1", $titulo_dia));
|
||||
return $id ? get_post((int) $id) : null;
|
||||
};
|
||||
$texto = $legacy_text();
|
||||
}
|
||||
|
||||
// navegación por día del calendario (año irrelevante; usamos un año bisiesto fijo)
|
||||
$base = get_permalink();
|
||||
|
||||
Reference in New Issue
Block a user