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,77 @@
<?php
/**
* Render newsletter in next steps widget
*
* @package AdvancedAds
*/
use AdvancedAds\Utilities\Conditional;
?>
<div class="section-title !mt-0">
<h3><?php esc_html_e( 'Newsletter & Email Courses', 'advanced-ads' ); ?></h3>
</div>
<p>
<?php
printf(
/* translators: %s is 'free email courses'. */
esc_html__( 'Join our %s for more benefits and insights:', 'advanced-ads' ),
'<strong>' . esc_html__( 'free email courses', 'advanced-ads' ) . '</strong>'
);
?>
</p>
<ul class="list-disc list-outside pl-3 ml-2">
<li>
<?php
printf(
/* translators: %s is '2 free add-ons' in bold. */
esc_html__( 'Gain %s', 'advanced-ads' ),
'<strong>' . esc_html__( '2 free add-ons', 'advanced-ads' ) . '</strong>'
);
?>
</li>
<li><?php esc_html_e( 'Take the First Steps with Advanced Ads', 'advanced-ads' ); ?></li>
<li><?php esc_html_e( 'Learn how to increase your Google AdSense earnings', 'advanced-ads' ); ?></li>
<li><?php esc_html_e( 'Get periodic ad monetization tutorials', 'advanced-ads' ); ?></li>
</ul>
<div class="advads-multiple-subscribe">
<fieldset class="space-y-2 mb-3">
<?php
if ( Conditional::user_can_subscribe( 'nl_first_steps' ) ) :
?>
<div>
<input type="checkbox" name="advads-multiple-subscribe" id="advads-dashboard-subscribe-first-steps" value="nl_first_steps" />
<label for="advads-dashboard-subscribe-first-steps">
<?php esc_html_e( '5-part First Steps series', 'advanced-ads' ); ?>
</label>
</div>
<?php endif; ?>
<?php
if ( Conditional::user_can_subscribe( 'nl_adsense' ) ) :
?>
<div>
<input type="checkbox" name="advads-multiple-subscribe" id="advads-dashboard-subscribe-google-adsense" value="nl_adsense" />
<label for="advads-dashboard-subscribe-google-adsense">
<?php esc_html_e( '8-part Google AdSense series', 'advanced-ads' ); ?>
</label>
</div>
<?php endif; ?>
<?php
if ( Conditional::user_can_subscribe( 'nl_first_steps' ) && Conditional::user_can_subscribe( 'nl_adsense' ) ) :
?>
<div>
<input type="checkbox" id="advads-dashboard-subscribe-periodic-expert" checked disabled/>
<label for="advads-dashboard-subscribe-periodic-expert">
<?php esc_html_e( 'Periodic expert tutorials', 'advanced-ads' ); ?>
</label>
</div>
<?php endif; ?>
</fieldset>
<button type="button" class="advads-btn_primary advads-multiple-subscribe_button">
<span class="dashicons dashicons-email-alt"></span>
<?php esc_html_e( 'Subscribe me now', 'advanced-ads' ); ?>
</button>
</div>

View File

@@ -0,0 +1,61 @@
<?php
/**
* Render next steps widget
*
* @package AdvancedAds
*/
use AdvancedAds\Constants;
use AdvancedAds\Utilities\Conditional;
$recent_ads = wp_advads_get_all_ads();
?>
<div class="advads-widget-wrapper">
<?php if ( count( $recent_ads ) === 0 ) : ?>
<p>
<a class="button button-primary" href="<?php echo esc_url( admin_url( 'post-new.php?post_type=' . Constants::POST_TYPE_AD ) ); ?>">
<?php esc_html_e( 'Create your first ad', 'advanced-ads' ); ?>
</a>
</p>
<p>
<a class="button button-primary" href="<?php echo esc_url( admin_url( 'admin.php?page=advanced-ads-settings#top#adsense' ) ); ?>">
<?php esc_html_e( 'Connect to AdSense', 'advanced-ads' ); ?>
</a>
</p>
<?php endif; ?>
<?php
if ( Conditional::user_can_subscribe( 'nl_first_steps' ) || Conditional::user_can_subscribe( 'nl_adsense' ) ) :
include ADVADS_ABSPATH . 'views/admin/widgets/aa-dashboard/next-steps/newsletter.php';
?>
<?php elseif ( count( $recent_ads ) > 3 && Advanced_Ads_Admin_Notices::get_instance()->can_display( 'review' ) ) : ?>
<div class="advads-admin-notice" data-notice="review">
<p><?php esc_html_e( 'Do you find Advanced Ads useful and would like to keep us motivated? Please help us with a review.', 'advanced-ads' ); ?></p>
<p>
<span class="dashicons dashicons-external"></span>&nbsp;<strong><a href="https://wordpress.org/support/plugin/advanced-ads/reviews/?rate=5#new-post" target="_blank">
<?php esc_html_e( 'Sure, Ill rate the plugin', 'advanced-ads' ); ?></a></strong>
&nbsp;&nbsp;<span class="dashicons dashicons-smiley"></span>&nbsp;<a href="javascript:void(0)" class="advads-notice-dismiss">
<?php esc_html_e( 'I already did', 'advanced-ads' ); ?></a>
</p>
</div>
<?php elseif ( count( $recent_ads ) > 0 ) : ?>
<p><a class="button button-secondary" href="<?php echo esc_url( admin_url( 'edit.php?post_type=' . Constants::POST_TYPE_AD ) ); ?>">
<?php esc_html_e( 'Manage your ads', 'advanced-ads' ); ?></a></p>
<?php endif; ?>
</div>
<?php do_action( 'advanced-ads-dashbaord-widget_next-steps' ); ?>
<?php
// Footer.
$all_access = Advanced_Ads_Admin_Licenses::get_instance()->get_probably_all_access();
if ( ! $all_access ) :
?>
<footer>
<a class="no-underline" href="https://wpadvancedads.com/add-ons/all-access/?utm_source=advanced-ads&utm_medium=link&utm_campaign=pitch-bundle" target="_blank">
<?php esc_html_e( 'Get the All Access pass', 'advanced-ads' ); ?>
<span aria-hidden="true" class="dashicons dashicons-external"></span>
</a>
</footer>
<?php endif; ?>

View File

@@ -0,0 +1,41 @@
<?php
/**
* Render box with problems and notifications on the Advanced Ads overview page
*
* @package AdvancedAds
*
* @var int $ignored_count number of ignored notices.
*/
use AdvancedAds\Utilities\Data;
?>
<div class="advads-widget-wrapper pt-4">
<?php if ( ! Advanced_Ads_Ad_Health_Notices::get_instance()->has_notices() ) : ?>
<div class="ml-2"><?php esc_html_e( 'There are no notifications.', 'advanced-ads' ); ?></div>
<?php else : ?>
<?php Advanced_Ads_Ad_Health_Notices::get_instance()->display_problems(); ?>
<?php Advanced_Ads_Ad_Health_Notices::get_instance()->display_notices(); ?>
<?php Advanced_Ads_Ad_Health_Notices::get_instance()->display_pitches(); ?>
<div class="advads-ad-health-notices-show-hidden" <?php echo ! $ignored_count ? 'style="display: none;"' : ''; ?>>
<?php
printf(
/* translators: %s is the number of hidden notices. */
esc_html__( '%s hidden notifications', 'advanced-ads' ),
'<span class="count">' . absint( $ignored_count ) . '</span>'
);
?>
</div>
<div class="advads-loader" style="display: none;"></div>
<?php endif; ?>
</div>
<footer>
<span class="dashicons dashicons-lightbulb"></span>
<a class="no-underline" href="<?php echo esc_url( Data::support_url( '/?utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-notices-support' ) ); ?>" target="_blank">
<?php esc_html_e( 'Save time and get personal support.', 'advanced-ads' ); ?>
<strong class="underline"><?php esc_html_e( 'Ask your question!', 'advanced-ads' ); ?></strong>
<span aria-hidden="true" class="dashicons dashicons-external"></span>
</a>
</footer>

View File

@@ -0,0 +1,46 @@
<?php
/**
* Render manual & support widget
*
* @package AdvancedAds
*/
use AdvancedAds\Utilities\Data;
?>
<div class="advads-widget-wrapper">
<div class="manual-wrapper">
<div>
<a class="title" href="https://wpadvancedads.com/manual/?utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-manual" target="_blank">
<span class="dashicons dashicons-welcome-learn-more"></span>
<?php esc_html_e( 'Manual', 'advanced-ads' ); ?>
</a>
</div>
<div class="divider"></div>
<div>
<a class="title" href="https://wpadvancedads.com/support/?utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-support" target="_blank">
<span class="dashicons dashicons-sos"></span>
<?php esc_html_e( 'Support & FAQ', 'advanced-ads' ); ?>
</a>
</div>
</div>
</div>
<div class="advads-widget-wrapper">
<div class="section-title">
<h3><?php esc_html_e( 'Latest Tutorials', 'advanced-ads' ); ?></h3>
</div>
<?php Data::display_rss_feed(); ?>
</div>
<footer>
<?php
printf(
/* translators: %1$s is the opening <a> tag, %2$s is the closing </a> tag. */
esc_html__( '%1$sThank the developer with a &#9733;&#9733;&#9733;&#9733;&#9733; review on wordpress.org%2$s', 'advanced-ads' ),
'<a href="' . esc_url( 'https://wordpress.org/support/plugin/advanced-ads/reviews/#new-post' ) . '" target="_blank">',
'<span aria-hidden="true" class="dashicons dashicons-external"></span></a>'
);
?>
</footer>

View File

@@ -0,0 +1,39 @@
<?php
/**
* Render RSS Posts
*
* @package AdvancedAds
*
* @var array $rss_posts RSS posts.
*/
?>
<?php if ( empty( $rss_posts ) || ! is_array( $rss_posts ) ) : ?>
<p>
<?php esc_html_e( 'Error: the Advanced Ads blog feed could not be downloaded.', 'advanced-ads' ); ?>
</p>
<?php
return;
endif;
?>
<div class="advads-rss-widget">
<ul>
<?php
foreach ( $rss_posts as $rss_post ) :
$utm_params = [
'utm_source' => 'advanced-ads',
'utm_medium' => 'rss-link',
'utm_campaign' => 'dashboard',
];
$rss_link = add_query_arg( $utm_params, $rss_post['link'] );
?>
<li>
<a class="rsswidget" target="_blank" href="<?php echo esc_url( $rss_link ); ?>">
<?php echo esc_html( $rss_post['title']['rendered'] ); ?>
</a>
</li>
<?php endforeach; ?>
</ul>
</div>

View File

@@ -0,0 +1,19 @@
<?php
/**
* Render footer in widget
*
* @package AdvancedAds
*/
?>
<footer>
<a href="https://wpadvancedads.com/category/tutorials/?utm_source=advanced-ads&utm_medium=link&utm_campaign=dashboard" target="_blank">
<?php esc_html_e( 'Visit our blog', 'advanced-ads' ); ?> <span class="screen-reader-text"> (opens in a new tab)</span><span aria-hidden="true" class="dashicons dashicons-external"></span>
</a>
<a href="https://wpadvancedads.com/manual/?utm_source=advanced-ads&utm_medium=link&utm_campaign=dashboard" target="_blank">
<?php esc_html_e( 'See the manual', 'advanced-ads' ); ?> <span class="screen-reader-text"> (opens in a new tab)</span><span aria-hidden="true" class="dashicons dashicons-external"></span>
</a>
<a class="go-pro" href="https://wpadvancedads.com/pricing/?utm_source=advanced-ads&utm_medium=link&utm_campaign=dashboard" target="_blank">
<?php esc_html_e( 'Get All Access', 'advanced-ads' ); ?> <span class="screen-reader-text"> (opens in a new tab)</span><span aria-hidden="true" class="dashicons dashicons-external"></span>
</a>
</footer>

View File

@@ -0,0 +1,31 @@
<?php
/**
* Render header in widget
*
* @package AdvancedAds
*/
use AdvancedAds\Constants;
use AdvancedAds\Utilities\WordPress;
$ads_count = WordPress::get_count_ads();
?>
<div class="advads-widget-wrapper">
<p class="advads-widget-header m-0">
<?php
printf(
/* translators: %1$d is the number of ads. */
esc_html__( '%1$d Ads', 'advanced-ads' ),
absint( $ads_count )
);
?>
|
<a href="<?php echo esc_url( admin_url( 'edit.php?post_type=' . Constants::POST_TYPE_AD ) ); ?>">
<?php esc_html_e( 'Manage Ads', 'advanced-ads' ); ?>
</a>
|
<a href="<?php echo esc_url( admin_url( 'post-new.php?post_type=' . Constants::POST_TYPE_AD ) ); ?>">
<?php esc_html_e( 'Create Ad', 'advanced-ads' ); ?>
</a>
</p>
</div>

View File

@@ -0,0 +1,51 @@
<?php
/**
* Render newsletter section
*
* @package AdvancedAds
*/
use AdvancedAds\Utilities\Conditional;
?>
<div class="advads-widget-wrapper">
<div class="section-title">
<h3><?php esc_attr_e( 'Newsletter & Email Courses', 'advanced-ads' ); ?></h3>
</div>
<p>
<?php
printf(
/* translators: %1$s 'free' (in bold), %2$s '2 free add-ons' (in bold) */
esc_html__(
'Join our newsletter and take our %1$s ad monetization email courses. Get tutorials, optimization tips, and %2$s!',
'advanced-ads'
),
'<strong>' . esc_html__( 'free', 'advanced-ads' ) . '</strong>',
'<strong>' . esc_html__( '2 free add-ons', 'advanced-ads' ) . '</strong>'
);
?>
</p>
<div class="advads-widget-buttons space-y-4">
<?php if ( Conditional::user_can_subscribe( 'nl_first_steps' ) ) : ?>
<div class="advads-admin-notice" data-notice="nl_first_steps">
<p class="m-0">
<button type="button" class="button-primary advads-notices-button-subscribe with-icon" data-notice="nl_first_steps">
<span class="dashicons dashicons-email-alt"></span>
<?php esc_html_e( '5-part First Steps series', 'advanced-ads' ); ?>
</button>
</p>
</div>
<?php endif; ?>
<?php if ( Conditional::user_can_subscribe( 'nl_adsense' ) ) : ?>
<div class="advads-admin-notice" data-notice="nl_adsense">
<p class="m-0">
<button type="button" class="button-primary advads-notices-button-subscribe with-icon" data-notice="nl_adsense">
<span class="dashicons dashicons-email-alt"></span>
<?php esc_html_e( '8-part Google AdSense series', 'advanced-ads' ); ?>
</button>
</p>
</div>
<?php endif; ?>
</div>
</div>

View File

@@ -0,0 +1,59 @@
<?php
/**
* Render performing ads section
*
* @package AdvancedAds
*/
$periods = [
'today' => __( 'today', 'advanced-ads' ),
'yesterday' => __( 'yesterday', 'advanced-ads' ),
'last7days' => __( 'last 7 days', 'advanced-ads' ),
'thismonth' => __( 'this month', 'advanced-ads' ),
'lastmonth' => __( 'last month', 'advanced-ads' ),
'thisyear' => __( 'this year', 'advanced-ads' ),
'lastyear' => __( 'last year', 'advanced-ads' ),
'custom' => __( 'custom', 'advanced-ads' ),
];
?>
<div class="advads-widget-wrapper">
<div class="section-title flex flex-row items-center flex-wrap gap-y-2 gap-x-2" style="padding-top: 0.3rem; padding-bottom: 0.3rem;">
<h3 class="!mt-0">
<?php esc_html_e( 'Best-performing Ads for', 'advanced-ads' ); ?>
</h3>
<select name="advads-performing-ads-period" disabled>
<?php foreach ( $periods as $key => $period ) : ?>
<option value="<?php echo esc_attr( $key ); ?>" <?php echo 'last7days' === $key ? 'selected' : ''; ?>><?php echo esc_html( $period ); ?></option>
<?php endforeach; ?>
</select>
<div class="advads-custom-period">
<div class="advads-custom-period-wrapper">
<fieldset class="flex gap-x-2">
<input type="text" name="advads-custom-from" autocomplete="off" size="10" maxlength="10" placeholder="<?php esc_html_e( 'from', 'advanced-ads' ); ?>"/>
<input type="text" name="advads-custom-to" autocomplete="off" size="10" maxlength="10" placeholder="<?php esc_html_e( 'to', 'advanced-ads' ); ?>"/>
</fieldset>
</div>
</div>
</div>
<div class="advads-performing-ads-track disabled">
<ul>
<li class="active" data-tab="clicks">Clicks</li>
<li data-tab="impressions">Impressions</li>
<li data-tab="ctr">CTR</li>
</ul>
<a href="<?php echo esc_attr( admin_url( 'admin.php?page=advanced-ads-stats' ) ); ?>"><?php esc_html_e( 'See full statistics', 'advanced-ads' ); ?></a>
</div>
<?php if ( ! defined( 'AAT_FILE' ) ) : ?>
<p>
<?php esc_html_e( 'No tracking add-on installed.', 'advanced-ads' ); ?>
</p>
<p>
<a class="go-pro" href="https://wpadvancedads.com/pricing/?utm_source=advanced-ads&utm_medium=link&utm_campaign=dashboard" target="_blank">
<?php esc_html_e( 'Advanced Ads All Access includes the Tracking add-on', 'advanced-ads' ); ?><span aria-hidden="true" class="dashicons dashicons-external"></span>
</a>
</p>
<?php endif; ?>
<?php do_action( 'advanced-ads-dashboard-performing-ads' ); ?>
</div>

View File

@@ -0,0 +1,17 @@
<?php
/**
* Render RSS section
*
* @package AdvancedAds
*/
use AdvancedAds\Utilities\Data;
?>
<div class="advads-widget-wrapper">
<div class="section-title">
<h3><?php esc_html_e( 'Latest Tutorials from Advanced Ads', 'advanced-ads' ); ?></h3>
</div>
<?php Data::display_rss_feed(); ?>
</div>