Initial commit — migración Joomla→WordPress feadulta.org

Incluye: mu-plugins custom (fea-homepage, carta-semana), scripts de
migración/traducción/deploy, documentación de auditoría, análisis de
cartas y HTML de evangelios exportados desde Joomla.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-03 08:33:12 -04:00
commit 668d973889
1925 changed files with 415604 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
<?php
// Import small folders into Carpetas_varias (ID 26)
$folders = ['home', 'jornada', 'pdf', 'presentaciones', 'publi', 'sobipro', 'titulos'];
$folder_id = 26;
global $wpdb;
$fbv_att = $wpdb->prefix . 'fbv_attachment_folder';
foreach ($folders as $name) {
$base_dir = '/var/www/html/wp-content/uploads/' . $name;
if (!is_dir($base_dir)) continue;
$files = scandir($base_dir);
$count = 0;
foreach ($files as $f) {
if ($f === '.' || $f === '..') continue;
$filepath = $base_dir . '/' . $f;
if (is_dir($filepath)) continue;
$guid_search = '%' . $name . '/' . $f;
$att_id = $wpdb->get_var($wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE guid LIKE %s AND post_type = 'attachment'", $guid_search));
if (!$att_id) {
$cmd = "wp media import " . escapeshellarg($filepath) . " --porcelain --allow-root";
$out = shell_exec($cmd);
$att_id = trim($out);
if (is_numeric($att_id)) {
$wpdb->query("INSERT INTO $fbv_att (folder_id, attachment_id) VALUES ($folder_id, $att_id)");
$count++;
}
}
}
echo "$name: $count files\n";
}
echo "DONE\n";