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,33 @@
<?php
/**
* The view to render the option.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.2
*
* @var int $checked Value of 1, when the option is checked.
*/
// display notice if js file was overridden.
if ( ! $checked && apply_filters( 'advanced-ads-activate-advanced-js', $checked ) ) : ?>
<p><?php esc_html_e( 'The file is currently enabled by an add-on that needs it.', 'advanced-ads' ); ?></p>
<?php endif; ?>
<label>
<input id="advanced-ads-advanced-js" type="checkbox" value="1" name="<?php echo esc_attr( ADVADS_SLUG ); ?>[advanced-js]" <?php checked( $checked, 1 ); ?>>
<?php
printf(
wp_kses(
/* translators: %s is a URL. */
__( 'Enable advanced JavaScript functions (<a href="%s" target="_blank">here</a>). Some features and add-ons might override this setting if they need features from this file.', 'advanced-ads' ),
[
'a' => [
'href' => [],
'target' => [],
],
]
),
'https://wpadvancedads.com/javascript-functions/?utm_source=advanced-ads&utm_medium=link&utm_campaign=settings'
);
?>
</label>

View File

@@ -0,0 +1,31 @@
<?php
/**
* Template for allow unfiltered_html for user roles on multisites.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.2
*
* @var WP_Role[] $user_roles_to_display Array of user roles that are allowed to edit ads.
* @var array $allowed_roles Array of user role names that are allowed to use unfiltered_html on ads.
*/
?>
<fieldset>
<legend><?php esc_html_e( 'Allow unfiltered HTML for these user roles:', 'advanced-ads' ); ?></legend>
<?php foreach ( $user_roles_to_display as $user_role ) : ?>
<p>
<input
type="checkbox"
id="<?php echo esc_attr( $user_role->name ); ?>"
name="<?php echo esc_attr( ADVADS_SLUG ); ?>[allow-unfiltered-html][]"
value="<?php echo esc_attr( $user_role->name ); ?>"
<?php checked( in_array( $user_role->name, $allowed_roles, true ) ); ?>
>
<label for="<?php echo esc_attr( $user_role->name ); ?>"><?php echo esc_html( $user_role->name ); ?></label>
</p>
<?php endforeach; ?>
</fieldset>
<p class="description">
<?php esc_html_e( 'Enabling this option for untrusted users may cause them to publish malicious or poorly formatted code in their ads and can be a potential security risk. You should carefully consider which user roles you grant this capability.', 'advanced-ads' ); ?>
</p>

View File

@@ -0,0 +1,26 @@
<?php
/**
* The view to render the option.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.2.0
*
* @var int $checked Value of 1, when the option is checked.
*/
use AdvancedAds\Utilities\Conditional;
?>
<label>
<input id="advanced-ads-block-bots" type="checkbox" value="1" name="<?php echo esc_attr( ADVADS_SLUG ); ?>[block-bots]" <?php checked( $checked, 1 ); ?>>
<?php if ( Conditional::is_ua_bot() ) : ?>
<span class="advads-notice-inline advads-error"><?php esc_html_e( 'You look like a bot', 'advanced-ads' ); ?></span>
<?php endif; ?>
<?php esc_html_e( 'Hide ads from crawlers, bots and empty user agents.', 'advanced-ads' ); ?>
<span class="description">
<a href="https://wpadvancedads.com/hide-ads-from-bots/?utm_source=advanced-ads&utm_medium=link&utm_campaign=settings" target="blank" class="advads-external-link">
<?php esc_html_e( 'Read this first', 'advanced-ads' ); ?>
</a>
</span>
</label>

View File

@@ -0,0 +1,51 @@
<?php
/**
* View to show the content injection settings.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.2
*/
?>
<fieldset>
<label>
<input type="radio" value="on" name="<?php echo esc_attr( ADVADS_SLUG ); ?>[content-injection-enabled]" <?php echo ( 'on' === $enabled || ( '' === $enabled && ! empty( $everywhere ) ) ) ? 'checked' : ''; ?> onclick="toggle_visibility(this, '[name=\'<?php echo esc_attr( ADVADS_SLUG ); ?>[content-injection-everywhere]\']');" />
on
</label>
<label>
<input type="radio" value="off" name="<?php echo esc_attr( ADVADS_SLUG ); ?>[content-injection-enabled]" <?php echo ( 'off' === $enabled || 0 === $everywhere ) ? 'checked' : ''; ?> onclick="toggle_visibility(this, '[name=\'<?php echo esc_attr( ADVADS_SLUG ); ?>[content-injection-everywhere]\']');" />
off
</label>
</fieldset>
<br/>
<select name="<?php echo esc_attr( ADVADS_SLUG ); ?>[content-injection-everywhere]" style="min-width: 85px; display:<?php echo ( 'off' === $enabled || 0 === $everywhere ) ? 'none' : 'block'; ?>" >
<option value="1" <?php selected( $everywhere, 1 ); ?>>1</option>
<option value="2" <?php selected( $everywhere, 2 ); ?>>2</option>
<option value="3" <?php selected( $everywhere, 3 ); ?>>3</option>
<option value="4" <?php selected( $everywhere, 4 ); ?>>4</option>
<option value="5" <?php selected( $everywhere, 5 ); ?>>5</option>
<option value="6" <?php selected( $everywhere, 6 ); ?>>6</option>
<option value="7" <?php selected( $everywhere, 7 ); ?>>7</option>
<option value="8" <?php selected( $everywhere, 8 ); ?>>8</option>
<option value="9" <?php selected( $everywhere, 9 ); ?>>9</option>
<option value="10" <?php selected( $everywhere, 10 ); ?>>10</option>
<option value="-1" <?php echo ( -1 === $everywhere || $everywhere > 10 ) ? 'selected' : ''; ?>>all</option>
</select>
<p class="description">
<?php
printf(
wp_kses(
/* translators: %s is a URL. */
__( 'To ensure compatibility, ads are not injected into excerpts or the full content of posts on archive pages. However, by enabling this option, you can override this restriction and set a limit on the number of posts where ads will be injected. Please note that if you want to insert ads between post listing items on archive pages, you can utilize the Post list placement (<a href="%s" target="_blank">manual</a>) feature.', 'advanced-ads' ),
[
'a' => [
'href' => [],
'target' => [],
],
]
),
esc_url( 'https://wpadvancedads.com/manual/placement-post-lists/?utm_source=advanced-ads&utm_medium=link&utm_campaign=settings-content-injection' )
);
?>
</p>

View File

@@ -0,0 +1,16 @@
<?php
/**
* The view to render the option.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.2
*
* @var int $checked Value of 1, when the option is checked.
*/
?>
<label>
<input id="advanced-ads-content-injection-level-disabled" type="checkbox" value="1" name="<?php echo esc_attr( ADVADS_SLUG ); ?>[content-injection-level-disabled]" <?php checked( $checked, 1 ); ?>>
<?php esc_html_e( 'Advanced Ads ignores paragraphs and other elements in containers when injecting ads into the post content. Check this option to ignore this limitation and ads might show up again.', 'advanced-ads' ); ?>
</label>

View File

@@ -0,0 +1,22 @@
<?php
/**
* Content injection priority setting.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.2
*/
?>
<input id="advanced-ads-content-injection-priority" type="number" value="<?php echo esc_attr( $priority ); ?>" name="<?php echo esc_attr( ADVADS_SLUG ); ?>[content-injection-priority]" size="3"/>
<p class="description">
<?php
if ( $priority < 11 ) :
?>
<span class="advads-notice-inline advads-error"><?php esc_html_e( 'Please check your post content. A priority of 10 and below might cause issues (wpautop function might run twice).', 'advanced-ads' ); ?></span><br />
<?php
endif;
esc_html_e( 'Play with this value in order to change the priority of the injected ads compared to other auto injected elements in the post content.', 'advanced-ads' );
?>
</p>

View File

@@ -0,0 +1,29 @@
<?php
/**
* Ad label settings
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.2
*
* @var bool $enabled If label setting is enabled.
* @var string $label Label input text.
* @var bool $html_enabled HTML allowed or not.
*/
?>
<fieldset>
<input type="checkbox" <?php checked( $enabled, true ); ?> value="1" name="<?php echo esc_attr( ADVADS_SLUG ); ?>[custom-label][enabled]"/>
<input id="advads-custom-label" type="text" value="<?php echo esc_html( $label ); ?>" name="<?php echo esc_attr( ADVADS_SLUG ); ?>[custom-label][text]"/>
</fieldset>
<p class="description">
<?php esc_html_e( 'Displayed above ads.', 'advanced-ads' ); ?>&nbsp;
<a class="advads-manual-link" href="https://wpadvancedads.com/manual/advertisement-label/?utm_source=advanced-ads&utm_medium=link&utm_campaign=settings-advertisement-label" target="_blank">
<?php esc_html_e( 'Manual', 'advanced-ads' ); ?>
</a>
</p>
<label>
<input type="checkbox" name="<?php echo esc_attr( ADVADS_SLUG ); ?>[custom-label][html_enabled]" value="1" <?php checked( $html_enabled, true ); ?> />
<?php esc_html_e( 'Enable HTML for the field', 'advanced-ads' ); ?>
</label>

View File

@@ -0,0 +1,100 @@
<?php
/**
* Render disable ads settings
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.2
*/
?>
<label>
<input
id="advanced-ads-disable-ads-all"
type="checkbox"
value="1"
name="<?php echo esc_attr( ADVADS_SLUG ); ?>[disabled-ads][all]"
<?php checked( $disable_all, 1 ); ?>
>
<?php esc_html_e( 'Disable all ads in frontend', 'advanced-ads' ); ?>
</label>
<span class="advads-help">
<span class="advads-tooltip">
<?php esc_html_e( 'Use this option to disable all ads in the frontend, but still be able to use the plugin.', 'advanced-ads' ); ?>
</span>
</span>
<br/>
<label>
<input
id="advanced-ads-disable-ads-404"
type="checkbox"
value="1"
name="<?php echo esc_attr( ADVADS_SLUG ); ?>[disabled-ads][404]"
<?php checked( $disable_404, 1 ); ?>
>
<?php esc_html_e( 'Disable ads on 404 error pages', 'advanced-ads' ); ?>
</label>
<br/>
<label>
<input
id="advanced-ads-disable-ads-archives"
type="checkbox"
value="1"
name="<?php echo esc_attr( ADVADS_SLUG ); ?>[disabled-ads][archives]"
<?php checked( $disable_archives, 1 ); ?>
>
<?php esc_html_e( 'Disable ads on non-singular pages', 'advanced-ads' ); ?>
</label>
<span class="advads-help">
<span class="advads-tooltip">
<?php esc_html_e( 'e.g. archive pages like categories, tags, authors, front page (if a list)', 'advanced-ads' ); ?>
</span>
</span>
<br/>
<label>
<input
id="advanced-ads-disable-ads-secondary"
type="checkbox"
value="1"
name="<?php echo esc_attr( ADVADS_SLUG ); ?>[disabled-ads][secondary]"
<?php checked( $disable_secondary, 1 ); ?>
>
<?php esc_html_e( 'Disable ads on secondary queries', 'advanced-ads' ); ?>
</label>
<span class="advads-help">
<span class="advads-tooltip">
<?php esc_html_e( 'Secondary queries are custom queries of posts outside the main query of a page. Try this option if you see ads injected on places where they shouldnt appear.', 'advanced-ads' ); ?>
</span>
</span>
<br/>
<label>
<input
id="advanced-ads-disable-ads-feed"
type="checkbox"
value="1"
name="<?php echo esc_attr( ADVADS_SLUG ); ?>[disabled-ads][feed]"
<?php checked( $disable_feed, 1 ); ?>
>
<?php esc_html_e( 'Disable ads in RSS Feed', 'advanced-ads' ); ?>
</label>
<br/>
<label>
<input
id="advanced-ads-disable-ads-rest-api"
type="checkbox"
value="1"
name="<?php echo esc_attr( ADVADS_SLUG ); ?>[disabled-ads][rest-api]"
<?php checked( $disable_rest_api, 1 ); ?>
>
<?php esc_html_e( 'Disable ads in REST API', 'advanced-ads' ); ?>
</label>

View File

@@ -0,0 +1,21 @@
<?php
/**
* The view to render the option.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.2
*
* @var int $checked Value of 1, when the option is checked.
*/
?>
<label>
<input id="advanced-ads-disabled-notices" type="checkbox" value="1" name="<?php echo esc_attr( ADVADS_SLUG ); ?>[disable-notices]" <?php checked( $checked, 1 ); ?>>
<?php
esc_html_e( 'Disable Ad Health in frontend and backend, warnings and internal notices like tips, tutorials, email newsletters and update notices.', 'advanced-ads' );
?>
<a href="https://wpadvancedads.com/manual/ad-health/?utm_source=advanced-ads&utm_medium=link&utm_campaign=settings-ad-health" target="_blank" class="advads-manual-link">
<?php esc_html_e( 'Manual', 'advanced-ads' ); ?>
</a>
</label>

View File

@@ -0,0 +1,25 @@
<?php
/**
* Disable post types upgrade notice.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.2
*/
use AdvancedAds\Admin\Upgrades;
foreach ( $post_types as $_type_id => $_type ) :
$_label = sprintf( '%s (%s)', $_type->label, $_type_id );
if ( $type_label_counts[ $_type->label ] < 2 ) {
$_label = $_type->label;
}
?>
<label style="margin-right: 1em;"><input type="checkbox" disabled="disabled"><?php echo esc_html( $_label ); ?></label>
<?php endforeach; ?>
<p>
<?php esc_html_e( 'The free version provides the post type display condition on the ad edit page.', 'advanced-ads' ); ?>
</p>
<p>
<?php Upgrades::pro_feature_link( 'upgrade-pro-disable-post-type' ); ?>
</p>

View File

@@ -0,0 +1,31 @@
<?php
/**
* The view to render the option.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.47.0
*
* @var boolean $allow True, when the option is checked.
*/
?>
<label>
<input id="advanced-ads-editors-manage-ads" type="checkbox" <?php checked( $allow, true ); ?> name="<?php echo esc_attr( ADVADS_SLUG ); ?>[editors-manage-ads]"/>
<?php esc_html_e( 'Allow editors to also manage and publish ads.', 'advanced-ads' ); ?>
<?php
printf(
wp_kses(
/* translators: %s is a URL. */
__( 'You can assign different ad-related roles on a user basis with <a href="%s" target="_blank">Advanced Ads Pro</a>.', 'advanced-ads' ),
[
'a' => [
'href' => [],
'target' => [],
],
]
),
'https://wpadvancedads.com/add-ons/advanced-ads-pro/?utm_source=advanced-ads&utm_medium=link&utm_campaign=settings'
);
?>
</label>

View File

@@ -0,0 +1,14 @@
<?php
/**
* Render frontend prefix settings
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.2
*/
?>
<input id="advanced-ads-front-prefix" type="text" value="<?php echo esc_attr( $prefix ); ?>" name="<?php echo esc_attr( ADVADS_SLUG ); ?>[front-prefix]" />
<?php // deprecated. ?>
<input type="hidden" value="<?php echo esc_attr( $old_prefix ); ?>" name="<?php echo esc_attr( ADVADS_SLUG ); ?>[id-prefix]" />
<p class="description"><?php esc_html_e( 'Prefix of class and id attributes for elements created in the frontend.', 'advanced-ads' ); ?></p>

View File

@@ -0,0 +1,36 @@
<?php
/**
* Render IP Address settings
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.2
*/
?>
<input
id="<?php echo esc_attr( ADVADS_SLUG ); ?>-disable-ads-ip-address"
type="checkbox"
value="1"
name="<?php echo esc_attr( ADVADS_SLUG ); ?>[hide-for-ip-address][enabled]"
class="advads-has-sub-settings"
<?php checked( $disable_ip_addr, 1 ); ?>
>
<label for="<?php echo esc_attr( ADVADS_SLUG ); ?>-disable-ads-ip-address">
<?php esc_html_e( 'Activate module', 'advanced-ads' ); ?>
</label>
<span class="advads-help">
<span class="advads-tooltip">
<?php esc_html_e( 'Enter one IP address per line for which no ads are displayed.', 'advanced-ads' ); ?>
</span>
</span>
<div class="advads-sub-settings" style="margin-top: 1em;">
<textarea
cols="50"
rows="5"
name="<?php echo esc_attr( ADVADS_SLUG ); ?>[hide-for-ip-address][ips]"
placeholder="<?php esc_html_e( 'Enter one IP address per line for which no ads are displayed.', 'advanced-ads' ); ?>"
><?php echo esc_textarea( $ip_address ); ?></textarea>
</div>

View File

@@ -0,0 +1,22 @@
<?php
/**
* The view to render the option.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.2
*
* @var array $roles Array of user roles.
* @var array $hide_for_roles Array of roles that should not see ads.
*/
?>
<div id="advads-settings-hide-by-user-role">
<?php foreach ( $roles as $_role => $_display_name ) : ?>
<label>
<input type="checkbox" value="<?php echo esc_attr( $_role ); ?>" name="<?php echo esc_attr( ADVADS_SLUG ); ?>[hide-for-user-role][]"<?php checked( in_array( $_role, $hide_for_roles, true ), true ); ?>>
<?php echo esc_html( $_display_name ); ?>
</label>
<?php endforeach; ?>
</div>
<p class="description"><?php esc_html_e( 'Choose the roles a user must have in order to not see any ads.', 'advanced-ads' ); ?></p>

View File

@@ -0,0 +1,19 @@
<?php
/**
* The view to render the option.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.2
*
* @var int $target Value of 1, when the option is checked.
*/
?>
<label>
<input name="<?php echo esc_attr( ADVADS_SLUG ); ?>[target-blank]" type="checkbox" value="1" <?php checked( 1, $target ); ?> />
<?php echo wp_kses( __( 'Open programmatically created links in a new window (use <code>target="_blank"</code>)', 'advanced-ads' ), [ 'code' => [] ] ); ?>
<a href="https://wpadvancedads.com/open-ad-in-new-window/?utm_source=advanced-ads&utm_medium=link&utm_campaign=open-new-window" target="_blank" class="advads-manual-link">
<?php esc_html_e( 'Manual', 'advanced-ads' ); ?>
</a>
</label>

View File

@@ -0,0 +1,17 @@
<?php
/**
* The view to render the option.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.2
*
* @var boolean $enabled Value of 1, when the option is checked.
*/
?>
<label>
<input type="checkbox" value="1" name="<?php echo esc_attr( ADVADS_SLUG ); ?>[uninstall-delete-data]" <?php checked( $enabled, 1 ); ?>>
<?php esc_html_e( 'Clean up all data related to Advanced Ads when removing the plugin.', 'advanced-ads' ); ?>
</label>
<?php

View File

@@ -0,0 +1,10 @@
<?php
/**
* Addon box for the license settings page.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 2.0.0
*/
\Advanced_Ads_Overview_Widgets_Callbacks::render_addons( true, false );

View File

@@ -0,0 +1,31 @@
<?php
/**
* View to show the license section in the settings.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.48.2
*/
?>
<p>
<a href="https://wpadvancedads.com/manual/how-to-install-an-add-on/?utm_source=advanced-ads&utm_medium=link&utm_campaign=settings-licenses-install-add-ons" target="_blank">
<?php esc_html_e( 'How to install and activate an add-on.', 'advanced-ads' ); ?>
</a>
<?php
printf(
wp_kses(
/* translators: %s is a URL. */
__( 'See also <a href="%s" target="_blank">Issues and questions about licenses</a>.', 'advanced-ads' ),
[
'a' => [
'href' => [],
'target' => [],
],
]
),
'https://wpadvancedads.com/manual/purchase-licenses/?utm_source=advanced-ads&utm_medium=link&utm_campaign=settings-licenses'
);
?>
</p>
<input type="hidden" id="advads-licenses-ajax-referrer" value="<?php echo esc_attr( wp_create_nonce( 'advads_ajax_license_nonce' ) ); ?>"/>