scripts(homenajes): migración Mardones/Galarreta + sync prod #130/#131/#133/#137/#138

Pipeline de los 23 posts de Mardones (anterior/*.htm → posts), repunte de
presentaciones de Galarreta, y scripts de sync a prod de las 5 issues del día.
Incluye retoques de fecha (2012-10-10) y eliminación de target=_blank en el
homenaje 17990.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-23 09:06:39 -04:00
parent e26b279e63
commit a2aefd8e0b
13 changed files with 536 additions and 0 deletions
@@ -0,0 +1,13 @@
<?php
global $wpdb;
$ex=$wpdb->get_var($wpdb->prepare("SELECT post_id FROM {$wpdb->postmeta} WHERE meta_key='_fgj2wp_old_id' AND meta_value=%s","9082"));
if($ex){ echo "ya existe en prod: $ex\n"; return; }
$content=file_get_contents('/entrada/9082_content.html');
$id=wp_insert_post(["post_type"=>"post","post_status"=>"publish","post_author"=>890,
"post_title"=>"El plan (casi definitivo) de León XIV en España, al descubierto: de Carabanchel a Arguineguín, pasando por Montserrat",
"post_content"=>$content,"post_date"=>"2026-04-09 12:07:26","to_ping"=>"","pinged"=>"","post_content_filtered"=>""],true);
if(is_wp_error($id)){ echo "ERROR: ".$id->get_error_message()."\n"; return; }
update_post_meta($id,"_fgj2wp_old_id","9082");
wp_set_post_categories($id,[41]);
if(function_exists('pll_set_post_language')) pll_set_post_language($id,'es');
echo "creado prod $id cat=".implode(",",wp_get_post_categories($id))." status=".get_post_status($id)."\n";