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,51 @@
<?php
/**
* Render Placement Bulk Edit Form
*
* @package AdvancedAds\Pro
* @author Advanced Ads <info@wpadvancedads.com>
*/
use AdvancedAds\Options;
?>
<fieldset class="inline-edit-col-right advanced-ads advads-bulk-edit">
<div class="inline-edit-col">
<div class="wp-clearfix">
<label>
<span class="title"><?php esc_html_e( 'Cache Busting', 'advanced-ads-pro' ); ?></span>
<select name="cache_busting">
<option value="">— <?php esc_html_e( 'No Change', 'advanced-ads-pro' ); ?> —</option>
<option value="auto"><?php esc_html_e( 'Auto', 'advanced-ads-pro' ); ?></option>
<option value="on"><?php esc_html_e( 'AJAX', 'advanced-ads-pro' ); ?></option>
<option value="off"><?php esc_html_e( 'Off', 'advanced-ads-pro' ); ?></option>
</select>
</label>
</div>
<div class="wp-clearfix">
<label>
<span class="title"><?php esc_html_e( 'Lazy Loading', 'advanced-ads-pro' ); ?></span>
<select name="lazy_loading">
<option value="">— <?php esc_html_e( 'No Change', 'advanced-ads-pro' ); ?> —</option>
<option value="enabled"><?php esc_html_e( 'Enabled', 'advanced-ads-pro' ); ?></option>
<option value="disabled"><?php esc_html_e( 'Disabled', 'advanced-ads-pro' ); ?></option>
</select>
</label>
</div>
<div class="wp-clearfix">
<label>
<span class="title"><?php esc_html_e( 'Hide when empty', 'advanced-ads-pro' ); ?></span>
<select name="cache_busting_empty">
<option value="">— <?php esc_html_e( 'No Change', 'advanced-ads-pro' ); ?> —</option>
<option value="1"><?php esc_html_e( 'Enabled', 'advanced-ads-pro' ); ?></option>
<option value="2"><?php esc_html_e( 'Disabled', 'advanced-ads-pro' ); ?></option>
</select>
<span class="advads-help v-middle">
<span class="advads-tooltip">
<?php esc_html_e( 'Remove the placeholder if unfilled.', 'advanced-ads-pro' ); ?>
</span>
</span>
</label>
</div>
</div>
</fieldset>

View File

@@ -0,0 +1,86 @@
<?php
/**
* AdSense fallback setting markup
*
* @package AdvancedAds\Pro
* @author Advanced Ads <info@wpadvancedads.com>
*
* @var bool $is_global whether it's the global or ad level fallback
* @var string $fallback the saved fallback item for the setting that is being displayed.
* @var array $item list of available fallback options.
* @var string $global_fallback global fallback item.
* @var Ad|Group|bool $global_fallback_object global fallback entity instance. `false` if there's none.
* @var array $cache_busting cache busting module's options.
*/
use AdvancedAds\Abstracts\Ad;
use AdvancedAds\Abstracts\Group;
?>
<?php if ( ! $is_global ) : ?>
<label class="label"><?php esc_html_e( 'Fallback', 'advanced-ads-pro' ); ?></label>
<?php endif; ?>
<div>
<select name="<?php echo esc_attr( $is_global ? GADSENSE_OPT_NAME . '[adsense_fallback]' : 'advanced_ad[adsense_fallback]' ); ?>">
<?php if ( ! $is_global ) : ?>
<option value="default" <?php selected( $fallback, 'default' ); ?>><?php esc_html_e( 'Default', 'advanced-ads-pro' ); ?></option>
<?php endif; ?>
<option value="none" <?php selected( $fallback, 'none' ); ?>><?php esc_html_e( 'None', 'advanced-ads-pro' ); ?></option>
<?php if ( ! empty( $items['groups'] ) ) : ?>
<optgroup label="<?php esc_attr_e( 'Ad groups', 'advanced-ads-pro' ); ?>">
<?php foreach ( $items['groups'] as $group ) : ?>
<option value="group_<?php echo esc_attr( $group->get_id() ); ?>" <?php selected( $fallback, 'group_' . $group->get_id() ); ?>>
<?php echo esc_html( $group->get_title() ); ?>
</option>
<?php endforeach; ?>
</optgroup>
<?php endif; ?>
<optgroup label="<?php esc_attr_e( 'Ads', 'advanced-ads-pro' ); ?>">
<?php foreach ( $items['ads'] as $ad ) : ?>
<option value="ad_<?php echo esc_attr( $ad->get_id() ); ?>" <?php selected( $fallback, 'ad_' . $ad->get_id() ); ?>>
<?php echo esc_html( $ad->get_title() ); ?>
</option>
<?php endforeach; ?>
</optgroup>
</select>
<?php if ( ! $is_global ) : ?>
<span class="advads-help">
<span class="advads-tooltip"><?php esc_html_e( 'The selected item will be displayed when an AdSense ad is unavailable, ensuring your ad space remains filled.', 'advanced-ads-pro' ); ?></span>
</span>
<?php endif; ?>
<?php if ( ! $is_global ) : ?>
<?php if ( ! $global_fallback_object ) : ?>
<?php esc_html_e( 'No default fallback ad selected. Choose one in the AdSense settings.', 'advanced-ads-pro' ); ?>
<?php else : ?>
<p>
<?php
printf(
/* translators: group or ad title. */
esc_html__( 'The default fallback is "%s". You can change this in the AdSense settings.', 'advanced-ads-pro' ),
esc_html( $global_fallback_object->get_title() )
);
?>
</p>
<?php endif; ?>
<?php else : ?>
<p class="description">
<?php esc_html_e( 'The selected item will be displayed when an AdSense ad is unavailable, ensuring your ad space remains filled.', 'advanced-ads-pro' ); ?>
</p>
<?php endif; ?>
<?php if ( empty( $cache_busting['enabled'] ) ) : ?>
<div class="notice advads-notice is-dismissible inline">
<p>
<?php
printf(
'%1$s <a href="%2$s">%3$s</a>',
esc_html__( 'The AdSense fallback feature requires the ad to be assigned to a placement with enabled Cache Busting.', 'advanced-ads-pro' ),
esc_url( admin_url( 'admin.php?page=advanced-ads-settings#top#pro' ) ),
esc_html__( 'Activate now', 'advanced-ads-pro' )
);
?>
</p>
</div>
<?php endif; ?>
</div>
<?php if ( ! $is_global ) : ?>
<hr>
<?php endif; ?>

View File

@@ -0,0 +1,10 @@
<?php
/**
* Render 'debug' column.
*
* @package AdvancedAds
*
* @var bool $display_once 'Display once' checked or not.
*/
echo $display_once ? esc_html__( 'Enabled', 'advanced-ads-pro' ) : '&mdash;';

View File

@@ -0,0 +1,4 @@
<?php
/**
* Silence is golden.
*/

View File

@@ -0,0 +1,23 @@
<?php
/**
* Suggested content for the privacy policy visible under Settings > Privacy > Policy Guide
*/
?>
<p class="privacy-policy-tutorial">
<?php esc_html_e( 'Depending on the setup, Advanced Ads Pro and other add-ons use cookies to control which user sees which ad. They also help to reduce expensive server requests.', 'advanced-ads-pro' ); ?>
</p>
<p class="privacy-policy-tutorial">
<?php esc_html_e( 'You can use the text below as a template for your own privacy policy.', 'advanced-ads-pro' ); ?>
</p>
<strong class="privacy-policy-tutorial"><?php esc_html_e( 'Suggested Text:', 'advanced-ads-pro' ); ?></strong>
<?php esc_html_e( 'This website uses Advanced Ads Pro to place advertisements. The WordPress plugin may use multiple first-party cookies to ensure the correct integration of ads. These cookies store technical information but not IP addresses. Their use is linked to specific features and options when embedding ads.', 'advanced-ads-pro' ); ?>
<br>
<?php
printf(
wp_kses_post(
/* translators: %1$s is an opening a tag, %2$s is the corresponding closing one */
__( 'Please, see the %1$sAdvanced Ads cookie information%2$s for more details.', 'advanced-ads-pro' )
),
'<a href="https://wpadvancedads.com/cookie-information/" target="_blank" rel="noopener">',
'</a>'
);

View File

@@ -0,0 +1,31 @@
<?php
/**
* Render the setting to enable output buffering.
*
* @var string $placement_positioning Placement positioning method.
* @var array $allowed_types_names A list of placement types that use output buffering.
*/
?>
<p class="description">
<?php
/* translators: %s: Names of placement types */
echo esc_html( sprintf( __( 'Choose when Advanced Ads will add the following placement types: %s', 'advanced-ads-pro' ), implode( ', ', $allowed_types_names ) ) );
?>
</p>
<label>
<input name="<?php echo esc_attr( Advanced_Ads_Pro::OPTION_KEY ); ?>[placement-positioning]" type="radio" value="js" <?php checked( $placement_positioning, 'js' ); ?> />
<?php esc_html_e( 'After page load using JavaScript', 'advanced-ads-pro' ); ?>
</label>
<label>
<input name="<?php echo esc_attr( Advanced_Ads_Pro::OPTION_KEY ); ?>[placement-positioning]" type="radio" value="php" <?php checked( $placement_positioning, 'php' ); ?> />
<?php esc_html_e( 'Before page load using PHP.', 'advanced-ads-pro' ); ?>
</label>
<span>
<?php
esc_html_e( 'This method also works on AMP pages and causes fewer conflicts with website optimization features. However, it can cause critical issues with a few other plugins that use a similar technique (i.e., output buffering). We recommend less technical users test it carefully.', 'advanced-ads-pro' );
?>
</span>

View File

@@ -0,0 +1,7 @@
<?php $optimizers = "Autoptimize, WP Rocket";
?><input name="<?php echo Advanced_Ads_Pro::OPTION_KEY; ?>[autoptimize-support-disabled]" type="checkbox" value="1" <?php checked( $autoptimize_support_disabled, 1 ); ?>"/>
<p class="description"><?php
/*
* translators: %s is a list of supported optimizer plugins
*/
echo sprintf(__( 'Advanced Ads Pro disables optimizers ( %s ) for displaying ads per default. Enable this option to allow optimizers to change the ad code. Especially JavaScript ads might stop working then.', 'advanced-ads-pro' ), $optimizers); ?></p>

View File

@@ -0,0 +1,70 @@
<?php // phpcs:ignore WordPress.Files.FileName
/**
* Custom code setting markup
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
*
* @var string $custom_code the custom code.
* @var false|array $settings CodeMirror setting.
* @var AdvancedAds\Abstracts\Ad $ad the ad being edited
* @var array $privacy_options the privacy module option.
*/
?>
<script>
/**
* Init Custom code UI.
*/
jQuery( document ).ready( () => {
const textarea = jQuery( '#advads-custom-code-textarea' );
const init = () => {
const settings = <?php echo wp_json_encode( $settings ); ?>;
if ( ! settings ) {
console.log( 'Advanced Ads >> Custom code settings not found' );
return;
}
const editor = wp.codeEditor.initialize( textarea, settings );
editor.codemirror.doc.setValue( textarea.val() );
editor.codemirror.doc.on( 'change', ( doc ) => {
jQuery( '#image-privacy-warning' ).toggle( '' !== doc.getValue().trim() );
} );
};
if ( ! textarea.is( ':hidden' ) ) {
init();
} else {
jQuery( '#advanced-ads-toggle-custom-code-editor' ).on( 'click', ( ev ) => {
ev.preventDefault();
jQuery( this ).hide();
jQuery( textarea ).slideToggle( 400, init );
} );
}
} );
</script>
<hr class="advads-hide-in-wizard"/>
<label class='label advads-hide-in-wizard' for="advads-custom-code-textarea"><?php esc_html_e( 'custom code', 'advanced-ads-pro' ); ?></label>
<div id="advads-custom-code-wrap" class="advads-hide-in-wizard">
<?php if ( ! empty( $privacy_options['enabled'] ) && ! empty( $privacy_options['consent-method'] ) && $ad->is_type( 'image' ) ) : ?>
<div id="image-privacy-warning" class="notice advads-notice inline" <?php echo $custom_code ? '' : 'style="display:none"'; ?>>
<p>
<?php
esc_html_e(
'Custom code is preventing the ad from being displayed until the visitor consents to your ads. You can override this by enabling the option "Ignore general Privacy settings and display the ad even without consent."',
'advanced-ads-pro'
);
?>
</p>
</div>
<?php endif; ?>
<?php if ( $custom_code ) : ?>
<textarea id="advads-custom-code-textarea" name="advanced_ad[output][custom-code]"><?php echo $custom_code; // phpcs:ignore ?></textarea>
<p class="description"><?php esc_html_e( 'Displayed after the ad content', 'advanced-ads-pro' ); ?></p>
<?php else : ?>
<textarea id="advads-custom-code-textarea" style="display:none" name="advanced_ad[output][custom-code]"><?php echo $custom_code; // phpcs:ignore ?></textarea>
<a id="advanced-ads-toggle-custom-code-editor" href="#"><?php esc_html_e( 'place your own code below the ad', 'advanced-ads-pro' ); ?>.</a>
<?php endif; ?>
<a href="https://wpadvancedads.com/how-to-add-custom-code-in-css-and-html-to-your-ads/?utm_source=advanced-ads?utm_medium=link&utm_campaign=ad-edit-custom-code" target="_blank" class="advads-manual-link"><?php esc_html_e( 'Manual', 'advanced-ads-pro' ); ?></a>
</div>

View File

@@ -0,0 +1,18 @@
<div id="advads-settings-hide-by-post-type">
<?php
foreach ( $post_types as $_type_id => $_type ) {
$checked = in_array( $_type_id, $selected, true );
if ( $type_label_counts[ $_type->label ] < 2 ) {
$_label = $_type->label;
} else {
$_label = sprintf( '%s (%s)', $_type->label, $_type_id );
}
?>
<label>
<input type="checkbox" name="<?php echo esc_attr( ADVADS_SLUG ); ?>[pro][general][disable-by-post-types][]" <?php checked( $checked, true ); ?> value="<?php echo esc_attr( $_type_id ); ?>"><?php echo esc_html( $_label ); ?>
</label>
<?php
}
?>
</div>

View File

@@ -0,0 +1,8 @@
<hr/>
<label for="advads-output-once" class="label"><?php _e( 'Display only once', 'advanced-ads-pro' ); ?></label>
<div>
<input type="hidden" name="advanced_ad[output][once_per_page]" value="off">
<input id="advads-output-once" name="advanced_ad[output][once_per_page]" type="checkbox" value="on" <?php checked( $once_per_page ); ?> />
<?php esc_html_e( 'Display the ad only once per page', 'advanced-ads-pro' ); ?>.
<a href="https://wpadvancedads.com/manual/optimizing-the-ad-layout/?utm_source=advanced-ads&utm_medium=link&utm_campaign=ad-edit-display-only-once#Display_only_once" target="_blank" class="advads-manual-link"><?php esc_html_e( 'Manual', 'advanced-ads' ); ?></a>
</div>

View File

@@ -0,0 +1,6 @@
<?php //phpcs:ignoreFile ?>
<p>
<label>
<input type="checkbox" name="advads[placements][options][repeat]" value="1"<?php checked( $data['repeat'] ?? 0, 1 ); ?>/><?php esc_html_e( 'repeat the position', 'advanced-ads-pro' ); ?>
</label>
</p>

View File

@@ -0,0 +1,8 @@
<?php //phpcs:ignoreFile ?>
<input type="number" min="0" name="advads[placements][options][words_between_repeats]" value="<?php echo absint( $words_between_repeats ); ?>" />
<p class="description">
<?php
esc_html_e( 'A minimum amount of words between automatically injected ads.', 'advanced-ads-pro' );
esc_html_e( 'Words are counted within paragraphs, headlines and any other element.', 'advanced-ads-pro' );
?>
</p>