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,38 @@
<?php
/**
* Extended Adblocker Popup Modal
*
* @package AdvancedAds\Pro
*
* @var string $modal_slug Unique slug that can be addressed by a link or button.
* @var string $modal_content The modal content. May contain HTML.
* @var string $close_action Adds close button.
* @var string $dismiss_button_styling Dismiss button styling.
* @var string $container_styling Container styling.
* @var string $background_styling Background styling.
*/
?>
<dialog id="modal-<?php echo esc_attr( $modal_slug ); ?>"
class="advads-modal"
data-modal-id="<?php echo esc_attr( $modal_slug ); ?>"
autofocus
style="<?php echo esc_attr( $background_styling ?? '' ); ?>">
<div class="advads-modal-content" style="<?php echo esc_attr( $container_styling ?? '' ); ?>">
<div class="advads-modal-body">
<?php
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- modal content may contain any kind of custom html
echo $modal_content;
?>
<?php if ( $close_action ) : ?>
<div class="close-wrapper">
<button class="advads-modal-close-action"
onclick="document.getElementById('modal-<?php echo esc_attr( $modal_slug ); ?>').close()"
style="<?php echo esc_attr( $dismiss_button_styling ?? '' ); ?>">
<?php echo esc_html( $close_action ); ?>
</button>
</div>
<?php endif; ?>
</div>
</div>
</dialog>

View File

@@ -0,0 +1,81 @@
<?php
/**
* Activate adblocker.
*
* @package Advanced_Ads_Pro\Module
*
* @var string $option_name array index name
* @var string $option_exclude array index name
* @var boolean $checked True, when the option is checked.
* @var boolean $exclude_checked True, when the option is checked.
* @var boolean $abf_enabled True, when the adblocker disguise is enabled.
*/
?>
<label class="advads-eadblocker-radio-button">
<input class="advanced-ads-adblocker-eab-method" name="<?php echo esc_attr( ADVADS_SETTINGS_ADBLOCKER . '[method]' ); ?>" type="radio" value="nothing"<?php checked( $method, 'nothing' ); ?> />
<?php esc_html_e( 'No additional actions', 'advanced-ads-pro' ); ?>
</label>
<label class="advads-eadblocker-radio-button">
<input class="advanced-ads-adblocker-eab-method" name="<?php echo esc_attr( ADVADS_SETTINGS_ADBLOCKER . '[method]' ); ?>" type="radio" value="overlay"<?php checked( $method, 'overlay' ); ?> />
<?php esc_html_e( 'Overlay', 'advanced-ads-pro' ); ?>
<span class="advads-help">
<span class="advads-tooltip" style="position: fixed; left: 628px; top: 332px;">
<?php
esc_html_e(
'Show a custom overlay to users with an ad blocker enabled, prompting them to turn it off on your website.',
'advanced-ads-pro'
);
?>
</span>
</span>
</label>
<label class="advads-eadblocker-radio-button">
<input class="advanced-ads-adblocker-eab-method" name="<?php echo esc_attr( ADVADS_SETTINGS_ADBLOCKER . '[method]' ); ?>" type="radio" value="redirect"<?php checked( $method, 'redirect' ); ?> />
<?php esc_html_e( 'Redirect', 'advanced-ads-pro' ); ?>
<span class="advads-help">
<span class="advads-tooltip" style="position: fixed; left: 628px; top: 332px;">
<?php
esc_html_e(
'Automatically redirect users with ad blockers enabled to an internal page. Content access is granted after turning off the ad blocker.',
'advanced-ads-pro'
);
?>
</span>
</span>
</label>
<p class="description advads-eab-overlay-notice">
<?php esc_html_e( 'Activate the ad blocker disguise above to display the overlay.', 'advanced-ads-pro' ); ?>
</p>
<div id="advanced-ads-adblocker-overlay-options" <?php echo 'overlay' === $method ? '' : 'style="display: none;"'; ?>>
<?php
$this->render_settings_overlay_content();
$this->render_settings_dismissible();
$this->render_settings_styling();
?>
</div>
<div id="advanced-ads-adblocker-redirect-options" <?php echo 'redirect' === $method ? '' : 'style="display: none;"'; ?>>
<h4>
<?php esc_html_e( 'Redirect URL', 'advanced-ads-pro' ); ?>
<span class="advads-help">
<span class="advads-tooltip">
<?php
esc_html_e(
'Enter a specific page on your domain to which users with activated AdBlocker should be automatically redirected.',
'advanced-ads-pro'
);
?>
</span>
</span>
</h4>
<input class="width-100" type="text" name="<?php echo esc_attr( ADVADS_SETTINGS_ADBLOCKER . '[redirect][url]' ); ?>" value="<?php echo esc_attr( $redirect_url ); ?>" />
</div>
<div id="advanced-ads-adblocker-option-exclude" <?php echo ( 'redirect' === $method || 'overlay' === $method ) ? '' : 'style="display: none;"'; ?>>
<?php $this->render_settings_exclude(); ?>
</div>

View File

@@ -0,0 +1,96 @@
<?php
/**
* Ad Blocker overlay options 'overlay again and dismiss button'
*
* @package Advanced_Ads_Pro\Module
*
* @var string $option_time_freq The array index name for the overlay timing option.
* @var string $button_text The option value for the dismiss button text.
* @var string $time_freq The option value for the overlay timing.
* @var boolean $hide_checked True, when the hide dismiss button option is checked.
* @var string $option_dismiss_style The array index name for the dismiss button styling option.
* @var string $dismiss_style The CSS value for the dismiss button styling.
*/
?>
<h4>
<?php esc_html_e( 'When to show overlay again?', 'advanced-ads-pro' ); ?>
<span class="advads-help">
<span class="advads-tooltip">
<?php esc_html_e( 'Set the timing for the overlay to reappear after being dismissed.', 'advanced-ads-pro' ); ?>
</span>
</span>
</h4>
<div class="advads-settings-margin">
<select name="<?php echo esc_attr( ADVADS_SETTINGS_ADBLOCKER . "[overlay][$option_time_freq]" ); ?>">
<option value="everytime" <?php selected( $time_freq, 'everytime' ); ?>>
<?php esc_html_e( 'Everytime', 'advanced-ads-pro' ); ?>
</option>
<option value="hour" <?php selected( $time_freq, 'hour' ); ?>>
<?php esc_html_e( '1 hour', 'advanced-ads-pro' ); ?>
</option>
<option value="day" <?php selected( $time_freq, 'day' ); ?>>
<?php esc_html_e( '1 day', 'advanced-ads-pro' ); ?>
</option>
<option value="week" <?php selected( $time_freq, 'week' ); ?>>
<?php esc_html_e( '1 week', 'advanced-ads-pro' ); ?>
</option>
<option value="month" <?php selected( $time_freq, 'month' ); ?>>
<?php esc_html_e( '1 month', 'advanced-ads-pro' ); ?>
</option>
<option value="never" <?php selected( $time_freq, 'never' ); ?>>
<?php esc_html_e( 'Never', 'advanced-ads-pro' ); ?>
</option>
</select>
</div>
<h4><?php esc_html_e( 'Dismiss button', 'advanced-ads-pro' ); ?></h4>
<input id="<?php echo esc_attr( ADVADS_SETTINGS_ADBLOCKER ); ?>-dismiss-button-input"
type="checkbox"
value="1"
name="<?php echo esc_attr( ADVADS_SETTINGS_ADBLOCKER . '[overlay][hide_dismiss]' ); ?>"
<?php checked( $hide_checked, 1, true ); ?>>
<label for="<?php echo esc_attr( ADVADS_SETTINGS_ADBLOCKER ); ?>-dismiss-button-input">
<?php esc_html_e( 'Hide dismiss button', 'advanced-ads-pro' ); ?>
<span class="advads-help">
<span class="advads-tooltip">
<?php esc_html_e( 'Disabling the dismiss button significantly limits site interaction.', 'advanced-ads-pro' ); ?>
</span>
</span>
</label>
<div id="<?php echo esc_attr( ADVADS_SETTINGS_ADBLOCKER ); ?>-dismiss-options">
<h4>
<?php esc_html_e( 'Dismiss button text', 'advanced-ads-pro' ); ?>
<span class="advads-help">
<span class="advads-tooltip">
<?php esc_html_e( 'Enter the text that you want to appear on the dismiss button.', 'advanced-ads-pro' ); ?>
</span>
</span>
</h4>
<input type="text"
name="<?php echo esc_attr( ADVADS_SETTINGS_ADBLOCKER . '[overlay][dismiss_text]' ); ?>"
value="<?php echo esc_attr( $button_text ); ?>"
placeholder="<?php esc_html_e( 'Dismiss', 'advanced-ads-pro' ); ?>" >
<?php if ( ! empty( $button_text ) ) : ?>
<p class="description"><?php esc_html_e( 'Empty and save to revert to defaults.', 'advanced-ads-pro' ); ?></p>
<?php endif; ?>
<h4>
<?php esc_html_e( 'Dismiss button styling', 'advanced-ads-pro' ); ?>
<span class="advads-help">
<span class="advads-tooltip">
<?php esc_html_e( 'Insert CSS to customize the dismiss button layout.', 'advanced-ads-pro' ); ?>
</span>
</span>
</h4>
<input class="width-100"
type="text"
name="<?php echo esc_attr( ADVADS_SETTINGS_ADBLOCKER . "[overlay][$option_dismiss_style]" ); ?>"
value="<?php echo esc_attr( $dismiss_style ); ?>"
placeholder="e.g. background-color: black; border-radius: 20px;">
<?php if ( ! empty( $dismiss_style ) ) : ?>
<p class="description"><?php esc_html_e( 'Empty and save to revert to defaults.', 'advanced-ads-pro' ); ?></p>
<?php endif; ?>
</div>

View File

@@ -0,0 +1,35 @@
<?php
/**
* Ad Blocker options 'exclude'
*
* @package Advanced_Ads_Pro\Module
* @var string $option_exclude array index name
* @var array $exclude exclude option value
*/
?>
<h4>
<?php esc_html_e( 'Exclude', 'advanced-ads-pro' ); ?>
<span class="advads-help">
<span class="advads-tooltip">
<?php esc_html_e( 'Choose which user roles to exclude from this ad blocker countermeasure.', 'advanced-ads-pro' ); ?>
</span>
</span>
</h4>
<div class="advads-settings-checkbox-inline">
<?php
foreach ( $roles as $_role => $_display_name ) :
$checked = in_array( $_role, $exclude, true );
?>
<label>
<input type="checkbox" value="<?php echo esc_attr( $_role ); ?>"
name="<?php echo esc_attr( ADVADS_SETTINGS_ADBLOCKER . "[$option_exclude][]" ); ?>"
<?php checked( $checked, true ); ?>>
<?php echo esc_html( $_display_name ); ?>
</label>
<?php
endforeach;
?>
</div>

View File

@@ -0,0 +1,12 @@
<?php
/**
* Ad Blocker overlay options 'dismiss button'
*
* @package Advanced_Ads_Pro\Module
* @var string $option_name array index name
* @var boolean $checked True, when the option is checked.
*/
?>
<h4><?php esc_html_e( 'Content', 'advanced-ads-pro' ); ?></h4>
<?php wp_editor( $content, 'adblocker_overlay_content_editor', $args ); ?>

View File

@@ -0,0 +1,47 @@
<?php
/**
* Ad Blocker overlay options 'stylings'
*
* @package Advanced_Ads_Pro\Module
* @var string $option_dismiss array index name
* @var string $option_container array index name
* @var string $option_background array index name
* @var string $container_style css
* @var string $background_style css
*/
?>
<h4>
<?php esc_html_e( 'Container styling', 'advanced-ads-pro' ); ?>
<span class="advads-help">
<span class="advads-tooltip">
<?php esc_html_e( 'Insert CSS to customize the overlay container layout.', 'advanced-ads-pro' ); ?>
</span>
</span>
</h4>
<input class="width-100"
type="text"
name="<?php echo esc_attr( ADVADS_SETTINGS_ADBLOCKER . "[overlay][$option_container]" ); ?>"
value="<?php echo esc_attr( $container_style ); ?>"
placeholder="e.g. background-color: salmon; border-radius: 10px; padding: 20px;">
<?php if ( ! empty( $container_style ) ) : ?>
<p class="description"><?php esc_html_e( 'Empty and save to revert to defaults.', 'advanced-ads-pro' ); ?></p>
<?php endif; ?>
<h4>
<?php esc_html_e( 'Background styling', 'advanced-ads-pro' ); ?>
<span class="advads-help">
<span class="advads-tooltip">
<?php esc_html_e( 'Insert CSS to customize the background of the overlay.', 'advanced-ads-pro' ); ?>
</span>
</span>
</h4>
<input class="width-100"
type="text"
name="<?php echo esc_attr( ADVADS_SETTINGS_ADBLOCKER . "[overlay][$option_background]" ); ?>"
value="<?php echo esc_attr( $background_style ); ?>"
placeholder="e.g. background-color: rgba(0, 0, 0, 0.9);">
<?php if ( ! empty( $background_style ) ) : ?>
<p class="description"><?php esc_html_e( 'Empty and save to revert to defaults.', 'advanced-ads-pro' ); ?></p>
<?php endif; ?>