Commit inicial - WordPress Análisis de Precios Unitarios

- WordPress core y plugins
- Tema Twenty Twenty-Four configurado
- Plugin allow-unfiltered-html.php simplificado
- .gitignore configurado para excluir wp-config.php y uploads

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
root
2025-11-03 21:04:30 -06:00
commit a22573bf0b
24068 changed files with 4993111 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
<?php
require_once(ABSPATH.'wp-admin/includes/upgrade.php');
require_once(FLUENTMAIL_PLUGIN_PATH.'database/migrations/EmailLogs.php');
class FluentMailDBMigrator
{
public static function run($network_wide = false)
{
global $wpdb;
if ($network_wide ) {
if (function_exists('get_sites') && function_exists('get_current_network_id')) {
$site_ids = get_sites(['fields' => 'ids', 'network_id' => get_current_network_id(), 'number' => 0]);
} else {
$site_ids = $wpdb->get_col(
"SELECT blog_id FROM $wpdb->blogs WHERE site_id = $wpdb->siteid;"
);
}
// Install the plugin for all these sites.
foreach ($site_ids as $site_id) {
switch_to_blog($site_id);
self::migrate();
restore_current_blog();
}
} else {
self::migrate();
}
}
public static function migrate()
{
\FluentMailMigrations\EmailLogs::migrate();
}
}
if (!isset($network_wide)) {
$network_wide = false;
}
FluentMailDBMigrator::run($network_wide);

View File

@@ -0,0 +1 @@
<?php // silence is golden

View File

@@ -0,0 +1,44 @@
<?php
namespace FluentMailMigrations;
class EmailLogs
{
/**
* Migrate the table.
*
* @return void
*/
public static function migrate()
{
global $wpdb;
$charsetCollate = $wpdb->get_charset_collate();
$table = $wpdb->prefix . FLUENT_MAIL_DB_PREFIX.'email_logs';
if ($wpdb->get_var("SHOW TABLES LIKE '$table'") != $table) {
$sql = "CREATE TABLE $table (
`id` INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
`site_id` INT UNSIGNED NULL,
`to` VARCHAR(255),
`from` VARCHAR(255),
`subject` VARCHAR(255),
`body` LONGTEXT NULL,
`headers` LONGTEXT NULL,
`attachments` LONGTEXT NULL,
`status` VARCHAR(20) DEFAULT 'pending',
`response` TEXT NULL,
`extra` TEXT NULL,
`retries` INT UNSIGNED NULL DEFAULT 0,
`resent_count` INT UNSIGNED NULL DEFAULT 0,
`source` VARCHAR(255) NULL,
`created_at` TIMESTAMP NULL,
`updated_at` TIMESTAMP NULL,
INDEX `status` (`status`)
) $charsetCollate;";
dbDelta($sql);
}
}
}