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,94 @@
<?php
/**
* Render the database update form.
*
* @package AdvancedAds\Pro\Modules\Geo
* @author Advanced Ads <info@wpadvancedads.com>
*
* @var bool $correct_databases
* @var string|false $last_update
* @var int $next_update
* @var bool $use_filters
*/
if ( $correct_databases ) : ?>
<p>
<?php esc_html_e( 'Geo Databases found.', 'advanced-ads-pro' ); ?>
</p>
<?php endif; ?>
<?php if ( $use_filters ) : ?>
<div class="advads-notice-inline advads-idea">
<p><?php esc_html_e( 'You are currently using filter hooks to load custom database files.', 'advanced-ads-pro' ); ?></p>
</div>
<?php
return;
endif;
?>
<p id="advanced-ads-geo-license-missing-warning" style="display: none;">
<span class="advads-notice-inline advads-error">
<?php esc_html_e( 'The MaxMind license key is missing.', 'advanced-ads-pro' ); ?>
</span>
<?php
printf(
/* translators: 1: opening <a>-tag to Advanced Ads manual, 2: closing <a>-tag */
esc_html__( 'Please read the %1$sinstallation instructions%2$s.', 'advanced-ads-pro' ),
'<a href="https://wpadvancedads.com/manual/geo-targeting-condition/#Enabling_Geo-Targeting" target="_blank">',
'</a>'
);
?>
</p>
<div id="advanced-ads-geo-update-database" <?php echo $correct_databases ? esc_attr( 'data-db-exists' ) : ''; ?>>
<?php if ( ! $correct_databases ) : ?>
<div id="advanced-ads-geo-no-database-warning">
<p class="advads-notice-inline advads-error">
<?php esc_html_e( 'Geo Databases not found.', 'advanced-ads-pro' ); ?>
</p>
<p>
<?php esc_html_e( 'In order to use Geo Targeting, please download the geo location databases by clicking on the button below.', 'advanced-ads-pro' ); ?>
</p>
</div>
<?php endif; ?>
<?php if ( ! $correct_databases || $this->is_update_available() ) : ?>
<button type="button" id="download_geolite" class="button-secondary">
<?php esc_html_e( 'Update geo location databases', 'advanced-ads-pro' ); ?> (~66MB)
</button>
<span class="advads-loader" id="advads-geo-loader" style="display: none;"></span>
<p class="advads-notice-inline advads-error hidden" id="advads-geo-upload-error"></p>
<p class="advads-notice-inline advads-check hidden" id="advads-geo-upload-success"></p>
<?php endif; ?>
</div>
<?php
if ( $correct_databases ) :
if ( $last_update ) :
?>
<p class="advads-notice-inline advads-check">
<?php
printf(
/* translators: Timestamp in the localized date_format */
esc_html__( 'Last update: %s', 'advanced-ads-pro' ),
esc_html( date_i18n( get_option( 'date_format' ), $last_update ) )
);
?>
</p>
<?php endif; ?>
<p>
<?php
printf(
/* translators: Timestamp in the localized date_format */
esc_html__( 'Next possible update on %s.', 'advanced-ads-pro' ),
esc_html( date_i18n( get_option( 'date_format' ), $next_update ) )
);
?>
</p>
<p class="description">
<?php esc_html_e( 'The databases are updated on the first Tuesday (midnight, GMT) of each month.', 'advanced-ads-pro' ); ?>
</p>
<?php
endif;

View File

@@ -0,0 +1,15 @@
<?php
/**
* @var string $locale
*/
?>
<select name="<?php echo Advanced_Ads_Pro::OPTION_KEY . '[' . Advanced_Ads_Geo_Plugin::OPTIONS_SLUG . '][locale]'; ?>">
<?php
foreach ( Advanced_Ads_Geo_Api::$locales as $_key => $_value ) {
?>
<option value="<?php echo $_key; ?>" <?php selected( $_key, $locale ); ?>><?php echo $_value; ?></option>
<?php
}
?>
</select>
<p class="description"><?php _e( 'Choose the language of the state/region or city entered. If the language is not available in the geo location database, it will check against the English version.', 'advanced-ads-pro' ); ?></p>

View File

@@ -0,0 +1,24 @@
<?php
/**
* View for the MaxMind license key setting.
*
* @package AdvancedAds\Pro\Modules\Geo
* @author Advanced Ads <info@wpadvancedads.com>
*
* @var string $license_key
* @var bool $use_filters
*/
printf(
'<input id="advanced-ads-geo-maxmind-licence" name="%s" type="text" data-customdb="%s" value="%s" />',
esc_attr( Advanced_Ads_Pro::OPTION_KEY . '[' . Advanced_Ads_Geo_Plugin::OPTIONS_SLUG . '][maxmind-license-key]' ),
$use_filters ? 'true' : '',
esc_attr( $license_key )
);
?>
<p class="description">
<a target="_blank" class="advads-external-link" rel="noopener" href="https://support.maxmind.com/hc/en-us/articles/4407111582235-Generate-a-License-Key">
<?php esc_attr_e( 'Manual', 'advanced-ads-pro' ); ?>
</a>
</p>

View File

@@ -0,0 +1,12 @@
<?php
/**
* @var array $methods
* @var string $method
*/
foreach ( $methods as $_key => $_method ) :
?>
<label>
<input type="radio" name="<?php echo Advanced_Ads_Pro::OPTION_KEY . '[' . Advanced_Ads_Geo_Plugin::OPTIONS_SLUG . '][method]'; ?>" value="<?php echo $_key; ?>" <?php checked( $_key, $method ); ?>/>
<?php echo $_method['description']; ?></label><br/>
<?php
endforeach;

View File

@@ -0,0 +1,22 @@
<?php
/**
* Show the visitor information saved to the `advanced_ads_visitor` cookie.
*
* @var Advanced_Ads_Geo_Visitor_Profile $visitor_profile
*/
?>
<p class="advads-condition-visitor-profile">
<strong><?php esc_html_e( 'Location based on your visitor profile cookie:', 'advanced-ads-pro' ); ?></strong>
<br>
<?php printf( '%s, %s, %s', esc_html( $visitor_profile->get_country() ), esc_html( $visitor_profile->region ), esc_html( $visitor_profile->city ) ); ?>
<br>
<?php esc_html_e( 'Coordinates', 'advanced-ads-pro' ); ?>: (<?php echo (float) $visitor_profile->lat; ?> / <?php echo (float) $visitor_profile->lon; ?>)
<br>
<button class="advads-condition-visitor-profile-reset" class="hide-if-no-js" type="button">
<?php esc_html_e( 'Reset Visitor Profile', 'advanced-ads-pro' ); ?>
</button>
</p>