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,26 @@
<?php
/**
* Template to show the ad.
*
* @package Advanced_Ads_Pro
*
* @var string $placement_content content of the placement.
* @var string $public_slug public slug or placement ID send as $_GET['p'] to allow placement-specific usage of the hooks.
*/
?>
<!DOCTYPE html>
<html>
<head>
<meta name="robots" content="noindex,nofollow">
<?php do_action( 'advanced-ads-pro-ad-server-template-head', $public_slug ); ?>
</head>
<body style="margin: 0;" >
<?php do_action( 'advanced-ads-pro-ad-server-template-after-opening-body', $public_slug ); ?>
<?php
// phpcs:ignore
echo $placement_content;
?>
<?php do_action( 'advanced-ads-pro-ad-server-template-before-closing-body', $public_slug ); ?>
</body>
</html>

View File

@@ -0,0 +1,57 @@
<?php
/**
* Render options for the Ad Server module
*
* @var string $embedding_url URL where the ad should be loaded.
* @var boolean $block_no_referrer Value of the block-no-referrer option.
*/
?>
<input name="<?php echo esc_attr( Advanced_Ads_Pro::OPTION_KEY ); ?>[ad-server][enabled]"
class="advads-has-sub-settings"
id="advanced-ads-pro-ad-server-enabled" type="checkbox" value="1" <?php checked( $module_enabled ); ?> />
<label for="advanced-ads-pro-ad-server-enabled" class="description">
<?php esc_html_e( 'Activate module.', 'advanced-ads-pro' ); ?>
</label>
<a href="https://wpadvancedads.com/ad-server-wordpress/?utm_source=advanced-ads&utm_medium=link&utm_campaign=pro-ad-server-manual'; ?>" target="_blank" class="advads-manual-link"><?php esc_html_e( 'Manual', 'advanced-ads-pro' ); ?></a>
<div class="advads-sub-settings">
<p class="description"><?php esc_html_e( 'Top level domains on which the ads will be loaded.', 'advanced-ads-pro' ); ?> <?php esc_html_e( 'Separate multiple values with a comma.', 'advanced-ads-pro' ); ?></p>
<label>
<input style="width: 90%" id="advanced-ads-pro-server-domains"
name="<?php echo esc_attr( Advanced_Ads_Pro::OPTION_KEY ); ?>[ad-server][embedding-url]" type="text"
value="<?php echo esc_html( $embedding_url ); ?>"/>
<p id="advanced-ads-pro-server-domains-error"
class="advads-notice-inline advads-error hidden"><?php esc_html_e( 'Please dont enter subdirectories.', 'advanced-ads-pro' ); ?></p>
</label>
<br/><br/>
<label>
<input name="<?php echo esc_attr( Advanced_Ads_Pro::OPTION_KEY ); ?>[ad-server][block-no-referrer]"
type="checkbox" value="1" <?php checked( $block_no_referrer ); ?> />
<?php esc_html_e( 'Prevent direct access to the placement URL.', 'advanced-ads-pro' ); ?>
</label>
</div>
<script>
// check if input is valid URLs without subdirectories
jQuery(document).ready(function () {
jQuery( '#advanced-ads-pro-server-domains' ).on( 'change', function () {
// Sudirectories are not allowed so lets just check for the / character
advanced_ads_pro_server_check_target_urls( jQuery(this).val() );
});
});
// run the check once on load.
advanced_ads_pro_server_check_target_urls( jQuery( '#advanced-ads-pro-server-domains' ).val() );
/**
* check if the URLs of the target sites are valid
* if not, show a warning
*
* @param string value of the target URL.
*/
function advanced_ads_pro_server_check_target_urls( value ) {
// is there a "/" with a preceding and following alphanumeric value then this might be a subdirectory
if ( /[a-z0-9]\/[a-z0-9]/.test( value ) ) {
jQuery('#advanced-ads-pro-server-domains-error').show();
} else {
jQuery('#advanced-ads-pro-server-domains-error').hide();
}
}
</script>

View File

@@ -0,0 +1,18 @@
<?php //phpcs:ignoreFile
/**
* Show placement related options
*
* @var string $public_slug URL where the ad placement can be accessed directly.
*/
?>
<input type="text" id="advanced-ads-pro-placement-server-slug" name="advads[placements][options][ad-server-slug]" value="<?php echo esc_attr( $public_slug ); ?>" />
<p id="advanced-ads-pro-placement-server-slug-update-message" class="advads-notice-inline advads-error hidden"><?php esc_html_e( 'Save the page to update the usage code below.', 'advanced-ads-pro' ); ?></p>
<p class="description"><?php esc_html_e( 'The name of the placement that appears in the URL and injection code.', 'advanced-ads-pro' ); ?></p>
<script>
jQuery( document ).ready( function() {
jQuery( '#advanced-ads-pro-placement-server-slug' ).on( 'change', function(){
jQuery( '#advanced-ads-pro-placement-server-slug-update-message' ).show();
});
});
</script>

View File

@@ -0,0 +1,32 @@
<?php
/**
* Show examples on how to use the ad server placement.
*
* @package AdvancedAds\Pro
*
* @var string $url URL where the ad placement can be accessed directly.
* @var string $placement_slug placement ID.
* @var string $public_slug public name of the placement.
*/
?>
<label>
<p><?php esc_html_e( 'Direct URL', 'advanced-ads-pro' ); ?></p>
<input type="text" onclick="this.select();" readonly="readonly" value="<?php echo esc_url( $url ); ?>" style="width:600px;max-width:90%;"/>
</label>
<br/><br/>
<label>
<p>iframe</p>
<input type="text" onclick="this.select();" readonly="readonly" value="<?php echo esc_html( '<iframe src="' . $url . '" scrolling="no" width="300" height="250" style="overflow: hidden;border:none;"></iframe>' ); ?>" style="width:600px;max-width:90%;"/>
</label>
<br/><br/>
<label>
<p>JavaScript</p>
<?php //phpcs:disable ?>
<textarea onclick="this.select();" readonly="readonly" style="width:600px;max-width:90%;" rows="5">
<div id="<?php echo $public_slug; ?>-box"></div>
<script>
fetch('<?php echo esc_url( $url ); ?>').then(function(e) { return e.text();}).then(function(body) { var server_parser = new DOMParser(); var doc = server_parser.parseFromString(body, "text/html"); var ad_container = doc.querySelector('div'); document.querySelector('#<?php echo $public_slug; ?>-box').innerHTML = ad_container.innerHTML; });
</script></textarea>
<?php //phpcs:enable ?>
</label>