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,30 @@
<?php //phpcs:ignore WordPress.Files.FileName.NotHyphenatedLowercase -- This filename format is intentionally used to match the plugin version.
/**
* The Updates routine for version 1.0.103.1
*
* @since 1.0.103.1
* @package RankMath
* @subpackage RankMath\Updates
* @author Rank Math <support@rankmath.com>
*/
use RankMath\Helper;
defined( 'ABSPATH' ) || exit;
/**
* Enable author sitemap.
*/
function rank_math_1_0_103_1_update_html_sitemap() {
$all_opts = rank_math()->settings->all_raw();
$sitemap_settings = $all_opts['sitemap'];
if ( isset( $sitemap_settings['authors_sitemap'] ) ) {
return;
}
$sitemap_settings['authors_sitemap'] = 'on';
Helper::update_all_settings( null, null, $sitemap_settings );
rank_math()->settings->reset();
}
rank_math_1_0_103_1_update_html_sitemap();

View File

@@ -0,0 +1,27 @@
<?php //phpcs:ignore WordPress.Files.FileName.NotHyphenatedLowercase -- This filename format is intentionally used to match the plugin version.
/**
* The Updates routine for version 1.0.104
*
* @since 1.0.104
* @package RankMath
* @subpackage RankMath\Updates
* @author Rank Math <support@rankmath.com>
*/
use RankMath\Helper;
defined( 'ABSPATH' ) || exit;
/**
* Update TOC block settings on existing sites.
*/
function rank_math_1_0_104_toc_block_settings() {
$all_opts = rank_math()->settings->all_raw();
$general = $all_opts['general'];
$general['toc_block_title'] = 'Table of Contents';
$general['toc_block_list_style'] = 'ul';
Helper::update_all_settings( $general, null, null );
rank_math()->settings->reset();
}
rank_math_1_0_104_toc_block_settings();

View File

@@ -0,0 +1,27 @@
<?php //phpcs:ignore WordPress.Files.FileName.NotHyphenatedLowercase -- This filename format is intentionally used to match the plugin version.
/**
* The Updates routine for version 1.0.107.3
*
* @since 1.0.107.3
* @package RankMath
* @subpackage RankMath\Updates
* @author Rank Math <support@rankmath.com>
*/
use RankMath\Helper;
defined( 'ABSPATH' ) || exit;
/**
* Replace %searchphrase% variable to %search_query%
*/
function rank_math_1_0_107_3_replace_search_variable() {
$all_opts = rank_math()->settings->all_raw();
$titles = $all_opts['titles'];
$titles['search_title'] = str_replace( '%searchphrase%', '%search_query%', $titles['search_title'] );
RankMath\Helper::update_all_settings( null, $titles, null );
rank_math()->settings->reset();
}
rank_math_1_0_107_3_replace_search_variable();

View File

@@ -0,0 +1,31 @@
<?php //phpcs:ignore WordPress.Files.FileName.NotHyphenatedLowercase -- This filename format is intentionally used to match the plugin version.
/**
* The Updates routine for version 1.0.110
*
* @since 1.0.110
* @package RankMath
* @subpackage RankMath\Updates
* @author Rank Math <support@rankmath.com>
*/
use RankMath\Helper;
defined( 'ABSPATH' ) || exit;
/**
* Update the deprecated schema type Attorney and used it as LegalService.
*/
function rank_math_1_0_110_update_local_business_type() {
$all_opts = rank_math()->settings->all_raw();
$titles = $all_opts['titles'];
if ( 'Attorney' !== $titles['local_business_type'] ) {
return;
}
$titles['local_business_type'] = 'LegalService';
Helper::update_all_settings( null, $titles, null );
rank_math()->settings->reset();
}
rank_math_1_0_110_update_local_business_type();

View File

@@ -0,0 +1,19 @@
<?php //phpcs:ignore WordPress.Files.FileName.NotHyphenatedLowercase -- This filename format is intentionally used to match the plugin version.
/**
* The Updates routine for version 1.0.201.1
*
* @since 1.0.201.1
* @package RankMath
* @subpackage RankMath\Updates
* @author Rank Math <support@rankmath.com>
*/
defined( 'ABSPATH' ) || exit;
/**
* Remove the schedule event used to update the prompts.
*/
function rank_math_1_0_201_1_remove_prompt_event() {
wp_clear_scheduled_hook( 'rank_math/content-ai/update_prompts' );
}
rank_math_1_0_201_1_remove_prompt_event();

View File

@@ -0,0 +1,37 @@
<?php //phpcs:ignore WordPress.Files.FileName.NotHyphenatedLowercase -- This filename format is intentionally used to match the plugin version.
/**
* The Updates routine for version 1.0.201
*
* @since 1.0.201
* @package RankMath
* @subpackage RankMath\Updates
* @author Rank Math <support@rankmath.com>
*/
use RankMath\Helper;
defined( 'ABSPATH' ) || exit;
/**
* Add default values for the new Content AI settings.
*/
function rank_math_1_0_201_content_ai_settings() {
$all_opts = rank_math()->settings->all_raw();
$general = $all_opts['general'];
$general['content_ai_country'] = 'all';
$general['content_ai_tone'] = 'Formal';
$general['content_ai_audience'] = 'General Audience';
$general['content_ai_language'] = Helper::content_ai_default_language();
Helper::update_all_settings( $general, null, null );
rank_math()->settings->reset();
// Update credits to array format. This is needed in case the call to credits endpoint on server fails for some reason.
Helper::update_credits( get_option( 'rank_math_ca_credits' ) );
// Fetch credits, plan & refresh date.
if ( Helper::is_site_connected() ) {
Helper::get_content_ai_credits( true );
}
}
rank_math_1_0_201_content_ai_settings();

View File

@@ -0,0 +1,28 @@
<?php //phpcs:ignore WordPress.Files.FileName.NotHyphenatedLowercase -- This filename format is intentionally used to match the plugin version.
/**
* The Updates routine for version 1.0.202.
*
* @since 1.0.202
* @package RankMath
* @subpackage RankMath\Updates
* @author Rank Math <support@rankmath.com>
*/
use RankMath\Helper;
defined( 'ABSPATH' ) || exit;
/**
* Convert English Language stored in Content AI settings to US English.
*/
function rank_math_1_0_202_content_ai_convert_english_language() {
$all_opts = rank_math()->settings->all_raw();
$general = $all_opts['general'];
if ( ! empty( $general['content_ai_language'] ) && 'English' === $general['content_ai_language'] ) {
$general['content_ai_language'] = 'US English';
}
Helper::update_all_settings( $general, null, null );
rank_math()->settings->reset();
}
rank_math_1_0_202_content_ai_convert_english_language();

View File

@@ -0,0 +1,19 @@
<?php //phpcs:ignore WordPress.Files.FileName.NotHyphenatedLowercase -- This filename format is intentionally used to match the plugin version.
/**
* The Updates routine for version 1.0.211.
*
* @since 1.0.211
* @package RankMath
* @subpackage RankMath\Updates
* @author Rank Math <support@rankmath.com>
*/
defined( 'ABSPATH' ) || exit;
/**
* Add value in options table to show a notification in Dashboard menu on existing setup.
*/
function rank_math_1_0_211_content_ai_store_notification_option() {
update_option( 'rank_math_view_modules', true, false );
}
rank_math_1_0_211_content_ai_store_notification_option();

View File

@@ -0,0 +1,21 @@
<?php //phpcs:ignore WordPress.Files.FileName.NotHyphenatedLowercase -- This filename format is intentionally used to match the plugin version.
/**
* The Updates routine for version 1.0.232.
*
* @since 1.0.232
* @package RankMath
* @subpackage RankMath\Updates
* @author Rank Math <support@rankmath.com>
*/
defined( 'ABSPATH' ) || exit;
/**
* Add indexes to the internal links table (target_post_id column).
*/
function rank_math_1_0_232_internal_links_table_indexes() {
global $wpdb;
$wpdb->query( "ALTER TABLE {$wpdb->prefix}rank_math_internal_links ADD INDEX target_post_id (target_post_id)" );
}
rank_math_1_0_232_internal_links_table_indexes();

View File

@@ -0,0 +1,25 @@
<?php //phpcs:ignore WordPress.Files.FileName.NotHyphenatedLowercase -- This filename format is intentionally used to match the plugin version.
/**
* The Updates routine for version 1.0.237.
*
* @since 1.0.237
* @package RankMath
* @subpackage RankMath\Updates
* @author Rank Math <support@rankmath.com>
*/
defined( 'ABSPATH' ) || exit;
/**
* Alter the redirections table structure.
*/
function rank_math_1_0_237_update_redirection_structure() {
// Early Bail if redirections table doesn't exist.
if ( ! \RankMath\Helpers\DB::check_table_exists( 'rank_math_redirections' ) ) {
return;
}
global $wpdb;
$wpdb->query( "ALTER TABLE {$wpdb->prefix}rank_math_redirections MODIFY COLUMN sources LONGTEXT NOT NULL" );
}
rank_math_1_0_237_update_redirection_structure();

View File

@@ -0,0 +1,28 @@
<?php //phpcs:ignore WordPress.Files.FileName.NotHyphenatedLowercase -- This filename format is intentionally used to match the plugin version.
/**
* The Updates routine for version 1.0.238.
*
* @since 1.0.238
* @package RankMath
* @subpackage RankMath\Updates
* @author Rank Math <support@rankmath.com>
*/
use RankMath\Helper;
defined( 'ABSPATH' ) || exit;
/**
* Flush rewrite rules.
*/
function rank_math_1_0_238_flush_rules() {
if (
Helper::is_woocommerce_active() &&
Helper::is_module_active( 'woocommerce' ) && (
Helper::get_settings( 'general.wc_remove_category_base' ) ||
Helper::get_settings( 'general.wc_remove_category_parent_slugs' ) )
) {
flush_rewrite_rules( true );
}
}
rank_math_1_0_238_flush_rules();

View File

@@ -0,0 +1,49 @@
<?php //phpcs:ignore WordPress.Files.FileName.NotHyphenatedLowercase -- This filename format is intentionally used to match the plugin version.
/**
* The Updates routine for version 1.0.239.
*
* @since 1.0.239
* @package RankMath
* @subpackage RankMath\Updates
* @author Rank Math <support@rankmath.com>
*/
use RankMath\KB;
use RankMath\Helper;
use RankMath\Helpers\Str;
use RankMath\Google\Analytics;
defined( 'ABSPATH' ) || exit;
/**
* Displays an admin notice to users with a Universal Analytics (UA) property, informing them to update to Google Analytics 4 (GA4).
*/
function rank_math_1_0_239_force_to_connect_ga4() {
if ( ! Analytics::is_analytics_connected() ) {
return;
}
$analytics = get_option( 'rank_math_google_analytic_options' );
if ( ! isset( $analytics['property_id'] ) || ! Str::starts_with( 'UA-', $analytics['property_id'] ) ) {
return;
}
Helper::add_notification(
sprintf(
// Translators: placeholders are opening and closing tags for connect analytics setting and using ga4 property doc.
__( 'Universal Analytics (UA) is no longer supported. Please connect your Google Analytics GA4 account by navigating to %1$sGeneral Settings → Analytics%2$s. For more details, refer to this guide: %3$sHow to Use Google Analytics 4 (GA4) Property with Rank Math%4$s.', 'rank-math' ),
'<a href="' . esc_url( Helper::get_admin_url( 'options-general#setting-panel-analytics' ) ) . '">',
'</a>',
'<a href="' . KB::get( 'using-ga4', 'Analytics GA4 KB' ) . '" target="_blank">',
'</a>'
),
[
'id' => 'upgrade-ua-to-ga4',
'type' => 'error',
'classes' => 'is-dismissible',
]
);
}
rank_math_1_0_239_force_to_connect_ga4();

View File

@@ -0,0 +1,35 @@
<?php //phpcs:ignore WordPress.Files.FileName.NotHyphenatedLowercase -- This filename format is intentionally used to match the plugin version.
/**
* The Updates routine for version 1.0.250
*
* @since 1.0.250
* @package RankMath
* @subpackage RankMath\Updates
* @author Rank Math <support@rankmath.com>
*/
use RankMath\Helper;
defined( 'ABSPATH' ) || exit;
/**
* Update LLMS Post types on existing sites.
*/
function rank_math_1_0_250_update_llms_post_types() {
$post_types = Helper::get_accessible_post_types();
if ( isset( $post_types['attachment'] ) ) {
unset( $post_types['attachment'] );
}
if ( empty( $post_types ) ) {
return;
}
$all_opts = rank_math()->settings->all_raw();
$general = $all_opts['general'];
$general['llms_post_types'] = array_keys( $post_types );
Helper::update_all_settings( $general, null, null );
rank_math()->settings->reset();
}
rank_math_1_0_250_update_llms_post_types();

View File

@@ -0,0 +1,20 @@
<?php //phpcs:ignore WordPress.Files.FileName.NotHyphenatedLowercase -- This filename format is intentionally used to match the plugin version.
/**
* The Updates routine for version 1.0.251
*
* @since 1.0.251
* @package RankMath
* @subpackage RankMath\Updates
* @author Rank Math <support@rankmath.com>
*/
defined( 'ABSPATH' ) || exit;
/**
* Update code needed to support React migration.
*/
function rank_math_1_0_251_migrate_react_settings() {
\RankMath\Status\Backup::create_backup();
update_option( 'rank_math_react_settings_ui', 'on', false );
}
rank_math_1_0_251_migrate_react_settings();

View File

@@ -0,0 +1,84 @@
<?php //phpcs:ignore WordPress.Files.FileName.NotHyphenatedLowercase -- This filename format is intentionally used to match the plugin version.
/**
* The Updates routine for version 1.0.84
*
* @since 1.0.84
* @package RankMath
* @subpackage RankMath\Updates
* @author Rank Math <support@rankmath.com>
*/
defined( 'ABSPATH' ) || exit;
/**
* Start the scheduled URL Inspections if Analytics module is enabled.
*/
function rank_math_1_0_84_init_url_inspections() {
$active_modules = get_option( 'rank_math_modules', [] );
if ( ! is_array( $active_modules ) || ! in_array( 'analytics', $active_modules, true ) ) {
return;
}
// Start first fetch in 15 minutes.
$start = time() + ( 15 * MINUTE_IN_SECONDS );
as_schedule_single_action( $start, 'rank_math/analytics/workflow', [ 'inspections', 0, null, null ], 'rank-math' );
}
rank_math_1_0_84_init_url_inspections();
/**
* Fix collations for the Analytics tables.
*/
function rank_math_1_0_84_check_analytics_collations() {
$tables = [
'rank_math_analytics_ga',
'rank_math_analytics_gsc',
'rank_math_analytics_keyword_manager',
];
$objects_coll = \RankMath\Helpers\DB::get_table_collation( 'rank_math_analytics_objects' );
foreach ( $tables as $table ) {
\RankMath\Helpers\DB::check_collation( $table, 'all', $objects_coll );
}
}
/**
* Run collation fixer on multisite or simple install.
*
* @return void
*/
function rank_math_1_0_84_check_collations() {
if ( is_multisite() ) {
foreach ( get_sites() as $site ) {
switch_to_blog( $site->blog_id );
rank_math_1_0_84_check_analytics_collations();
restore_current_blog();
}
return;
}
rank_math_1_0_84_check_analytics_collations();
}
rank_math_1_0_84_check_collations();
/**
* Enable the Index Status tab by default.
*/
function rank_math_1_0_84_update_analytics_options() {
$active_modules = get_option( 'rank_math_modules', [] );
if ( ! is_array( $active_modules ) || ! in_array( 'analytics', $active_modules, true ) ) {
return;
}
$options = get_option( 'rank_math_google_analytic_profile' );
if ( ! is_array( $options ) ) {
return;
}
$options['enable_index_status'] = true;
update_option( 'rank_math_google_analytic_profile', $options );
}
rank_math_1_0_84_update_analytics_options();

View File

@@ -0,0 +1,26 @@
<?php //phpcs:ignore WordPress.Files.FileName.NotHyphenatedLowercase -- This filename format is intentionally used to match the plugin version.
/**
* The Updates routine for version 1.0.86
*
* @since 1.0.86
* @package RankMath
* @subpackage RankMath\Updates
* @author Rank Math <support@rankmath.com>
*/
use RankMath\Helper;
defined( 'ABSPATH' ) || exit;
/**
* Update Analytics Stats on existing sites.
*/
function rank_math_1_0_86_update_analytics_stats() {
$all_opts = rank_math()->settings->all_raw();
$general = $all_opts['general'];
$general['analytics_stats'] = 'on';
Helper::update_all_settings( $general, null, null );
rank_math()->settings->reset();
}
rank_math_1_0_86_update_analytics_stats();

View File

@@ -0,0 +1,40 @@
<?php //phpcs:ignore WordPress.Files.FileName.NotHyphenatedLowercase -- This filename format is intentionally used to match the plugin version.
/**
* The Updates routine for version 1.0.89
*
* @since 1.0.89
* @package RankMath
* @subpackage RankMath\Updates
* @author Rank Math <support@rankmath.com>
*/
defined( 'ABSPATH' ) || exit;
/**
* Convert keywords used in Content AI to lower case on existing sites.
*/
function rank_math_1_0_89_update_contentai_data() {
$data = get_option( 'rank_math_ca_data' );
if ( empty( $data ) ) {
return;
}
foreach ( $data as $country => $keywords ) {
if ( empty( $keywords ) ) {
continue;
}
$ret = [];
foreach ( $keywords as $key => $keyword ) {
$ret[ mb_strtolower( $key ) ] = $keyword;
}
if ( ! empty( $ret ) ) {
$data[ $country ] = $ret;
}
}
update_option( 'rank_math_ca_data', $data );
}
rank_math_1_0_89_update_contentai_data();

View File

@@ -0,0 +1,54 @@
<?php //phpcs:ignore WordPress.Files.FileName.NotHyphenatedLowercase -- This filename format is intentionally used to match the plugin version.
/**
* The Updates routine for version 1.0.98
*
* @since 1.0.98
* @package RankMath
* @subpackage RankMath\Updates
* @author Rank Math <support@rankmath.com>
*/
defined( 'ABSPATH' ) || exit;
/**
* Get a group's ID based on its name/slug.
*
* @param string $slug The string name of a group.
*
* @return int The group's ID, if it exists or is created, or 0 if it does not exist and is not created.
*/
function rank_math_1_0_98_as_get_group_id( $slug ) {
if ( empty( $slug ) ) {
return 0;
}
global $wpdb;
$table = $wpdb->prefix . 'actionscheduler_groups';
$group_id = (int) $wpdb->get_var( $wpdb->prepare( "SELECT group_id FROM {$table} WHERE slug=%s", $slug ) );
return $group_id;
}
/**
* Fix Action Scheduler groups.
*/
function rank_math_1_0_98_fix_as_groups() {
$workflow_group_id = rank_math_1_0_98_as_get_group_id( 'workflow' );
$inspections_group_id = rank_math_1_0_98_as_get_group_id( 'rank_math/analytics/get_inspections_data' );
$rank_math_group_id = rank_math_1_0_98_as_get_group_id( 'rank-math' );
if ( 0 === $rank_math_group_id ) {
return;
}
// In the actions table, update the group_id for all actions in the 'workflow' & 'rank_math/analytics/get_inspections_data' groups to the 'rank-math' group.
global $wpdb;
$actions_table = $wpdb->prefix . 'actionscheduler_actions';
$wpdb->query( $wpdb->prepare( "UPDATE {$actions_table} SET group_id=%d WHERE group_id=%d OR group_id=%d", $rank_math_group_id, $workflow_group_id, $inspections_group_id ) );
// Delete the 'workflow' & 'rank_math/analytics/get_inspections_data' groups.
$groups_table = $wpdb->prefix . 'actionscheduler_groups';
$wpdb->query( $wpdb->prepare( "DELETE FROM {$groups_table} WHERE group_id=%d OR group_id=%d", $workflow_group_id, $inspections_group_id ) );
}
rank_math_1_0_98_fix_as_groups();