668d973889
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>
26 lines
834 B
PHP
26 lines
834 B
PHP
<?php
|
|
// Config: folder name and FileBird ID
|
|
$target_rel_path = 'quienes_somos';
|
|
$fbv_folder_id = 4; // Confirmed 'quienes_somos' folder ID
|
|
|
|
$uploads = wp_upload_dir();
|
|
$base_dir = $uploads['basedir'];
|
|
$target_dir = $base_dir . '/' . $target_rel_path;
|
|
|
|
if (!file_exists($target_dir)) {
|
|
die("Directory not found: $target_dir\n");
|
|
}
|
|
|
|
$files = glob("$target_dir/*");
|
|
$count = 0;
|
|
|
|
foreach ($files as $file) {
|
|
if (!is_file($file) || in_array(pathinfo($file, PATHINFO_EXTENSION), ['html', 'php'])) {
|
|
continue;
|
|
}
|
|
// We will echo commands to run directly
|
|
echo "wp media import " . escapeshellarg($file) . " --porcelain | xargs -I {} wp db query \"INSERT INTO wp_fbv_attachment_folder (folder_id, attachment_id) VALUES ($fbv_folder_id, {})\" --allow-root\n";
|
|
$count++;
|
|
}
|
|
echo "# Generated $count commands\n";
|
|
?>
|