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,75 @@
<?php // phpcs:disable WordPress.Files.FileName.NotHyphenatedLowercase
/**
* Ad blocker disguise rebuild template
*
* @package AdvancedAds\Pro
* @var array $upload_dir wp_upload_dir response
* @var string $message Response message
* @var bool|null $success Whether request was successful
* @var bool $button_disabled If button should have disabled attribute.
*/
?>
<?php if ( ! empty( $message ) && isset( $success ) ) : ?>
<div class="<?php echo $success ? 'advads-check' : 'advads-error'; ?> advads-notice-inline is-dismissible">
<p><?php echo esc_html( $message ); ?></p>
</div>
<?php endif; ?>
<?php if ( ! empty( $upload_dir['error'] ) ) : ?>
<p class="advads-notice-inline advads-error"><?php esc_html_e( 'Upload folder is not writable', 'advanced-ads' ); ?></p>
<?php
return;
endif;
?>
<div id="advanced-ads-rebuild-assets-form">
<?php if ( ! empty( $options['folder_name'] ) && ! empty( $options['module_can_work'] ) ) : ?>
<table class="form-table" role="presentation">
<tbody>
<tr>
<th scope="row"><?php esc_html_e( 'Asset path', 'advanced-ads' ); ?></th>
<td><?php echo esc_html( trailingslashit( $upload_dir['basedir'] ) . $options['folder_name'] ); ?></td>
</tr>
<tr>
<th scope="row"><?php esc_html_e( 'Asset URL', 'advanced-ads' ); ?></th>
<td><?php echo esc_html( trailingslashit( $upload_dir['baseurl'] ) . $options['folder_name'] ); ?></td>
</tr>
<tr>
<th scope="row"><?php esc_html_e( 'Rename assets', 'advanced-ads' ); ?></th>
<td>
<label>
<input type="checkbox" name="advads_ab_assign_new_folder">
<?php echo esc_html__( 'Check if you want to change the names of the assets', 'advanced-ads' ) . '.'; ?>
<span class="advads-help">
<span class="advads-tooltip" style="position: fixed; left: 693px; top: 387px;">
<?php esc_html_e( 'This feature relocates potentially blocked scripts to a new, randomly named folder to help bypass ad blockers. The folder receives updates during plugin updates. Occasional rebuilding of the asset folder prevents browsers from caching outdated versions. If you\'re already using a plugin that renames scripts, like Autoptimize or WP Rocket, turn off this feature to avoid conflicts.', 'advanced-ads' ); ?>
</span>
</span>
</label>
</td>
</tr>
</tbody>
</table>
<?php else : ?>
<p>
<?php
$folder = ! empty( $options['folder_name'] )
? trailingslashit( $upload_dir['basedir'] ) . $options['folder_name']
: $upload_dir['basedir'];
printf(
/* translators: placeholder is path to folder in uploads dir */
esc_html__( 'Please, rebuild the asset folder. All assets will be located in %s', 'advanced-ads' ),
sprintf( '<strong>%s</strong>', esc_attr( $folder ) )
);
?>
</p>
<?php endif; ?>
<p class="submit">
<button type="button" class="button button-primary" id="advads-adblocker-rebuild" <?php echo( $button_disabled ? 'disabled' : '' ); ?>>
<?php esc_html_e( 'Rebuild asset folder', 'advanced-ads' ); ?>
</button>
</p>
</div>

View File

@@ -0,0 +1,37 @@
<?php
/**
* The view to render the option.
*
* @package AdvancedAds
* @var boolean $checked True, when the option is checked.
* @var boolean $is_main_site True, when the site is the main site of the current network.
*/
?>
<label>
<?php if ( $is_main_site ) : ?>
<input id="advanced-ads-use-adblocker" type="checkbox" value="1" name="<?php echo esc_attr( ADVADS_SETTINGS_ADBLOCKER ); ?>[use-adblocker]" <?php checked( $checked, 1, true ); ?>>
<?php else : ?>
<?php esc_html_e( 'The ad block disguise can only be set by the super admin on the main site in the network.', 'advanced-ads' ); ?>
<?php endif ?>
<?php esc_html_e( 'Prevents ad blockers from breaking your website when blocking asset files (.js, .css).', 'advanced-ads' ); ?>
<?php if ( ! defined( 'AAP_VERSION' ) ) : ?>
<p>
<?php
printf(
wp_kses(
/* translators: %s is a URL. */
__( 'Learn how to display alternative content to ad block users <a href="%s" target="_blank">in the manual</a>.', 'advanced-ads' ),
[
'a' => [
'href' => [],
'target' => [],
],
]
),
'https://wpadvancedads.com/manual/ad-blockers/#utm_source=advanced-ads&utm_medium=link&utm_campaign=adblock-manual'
);
?>
</p>
<?php endif; ?>
</label>