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,27 @@
<?php // phpcs:ignore WordPress.Files.FileName
namespace Advanced_Ads;
use AdvancedAds\Abstracts\Ad;
/**
* Ad Repository/Factory class.
*
* @deprecated 2.0.0
*/
class Ad_Repository {
/**
* Get the ad object from the repository. Create and add it, if it doesn't exist.
* If the passed id is not an ad, return the created ad object without adding it to the repository.
* This behavior prevents breaking changes.
*
* @deprecated 2.0.0
*
* @param int $id The ad id to look for.
*
* @return Ad|bool
*/
public static function get( int $id ) {
return wp_advads_get_ad( $id );
}
}

View File

@@ -0,0 +1,35 @@
<?php // phpcs:ignore WordPress.Files.FileName
/**
* Group Repository class.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
*/
namespace Advanced_Ads;
use AdvancedAds\Abstracts\Group;
/**
* Group Repository/Factory class.
*
* @deprecated 2.0.0
*/
class Group_Repository {
/**
* Get the ad object from the repository. Create and add it, if it doesn't exist.
* If the passed id is not an ad, return the created ad object without adding it to the repository.
* This behavior prevents breaking changes.
*
* @deprecated 2.0.0
*
* @param int|WP_Term $term The term to look for.
*
* @return Group|bool
*/
public static function get( $term ) {
_deprecated_function( __METHOD__, '2.0.0', 'wp_advads_get_group()' );
return wp_advads_get_group( $term );
}
}

View File

@@ -0,0 +1,15 @@
<?php // phpcs:ignoreFileName
/**
* Frontend AJAX
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
*/
/**
* Frontend AJAX
*
* @since 1.1.0
* @deprecated 1.53.0
*/
class Advanced_Ads_Ajax {}

View File

@@ -0,0 +1,15 @@
<?php // phpcs:ignore WordPress.Files.FileName
/**
* Debug ad
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
*/
/**
* Ad debug
*
* @since 1.1.0
* @deprecated 1.53.0
*/
class Advanced_Ads_Ad_Debug {}

View File

@@ -0,0 +1,10 @@
<?php // phpcs:ignoreFilename
defined( 'ABSPATH' ) || exit;
/**
* Ad Expiration functionality.
*
* @deprecated 1.48.2
*/
class Advanced_Ads_Ad_Expiration {}

View File

@@ -0,0 +1,21 @@
<?php // phpcs:ignoreFileName
/**
* Advanced Ads Model
*
* @deprecated 2.0.0
*/
class Advanced_Ads_Model {
/**
* Get the array with ad placements
*
* @since 1.1.0
* @deprecated 2.0.0 Use `wp_advads_get_all_placements()` instead
*
* @return array $ad_placements
*/
public function get_ad_placements_array() {
return wp_advads_get_all_placements();
}
}

View File

@@ -0,0 +1,150 @@
<?php // phpcs:ignoreFilename
/**
* Abstracts ad selection.
*
* The class allows to modify 'methods' (named callbacks) to provide ads
* through `advanced-ads-ad-select-methods` filter.
* This can be used to replace default methods, wrap them or add new ones.
*
* Further allows to provide ad selection attributes
* through `advanced-ads-ad-select-args` filter to influence behaviour of the
* selection method.
* Default methods have a `override` attribute that allows to replace the
* content. This may be used to defer or skip ad codes dynamically.
*
* @since 1.5.0
*/
class Advanced_Ads_Select {
const PLACEMENT = 'placement';
const GROUP = 'group';
const AD = 'id';
/**
* Hold methods
*
* @var array
*/
protected $methods;
/**
* Get instance of this class.
*
* @return Advanced_Ads_Select
*/
public static function get_instance() {
static $instance;
if ( ! isset( $instance ) ) {
$instance = new self();
}
return $instance;
}
/**
* Get ad selection methods.
*
* @return array
*/
public function get_methods() {
if ( ! isset( $this->methods ) ) {
$methods = [
self::AD => [ $this, 'get_ad_by_id' ],
self::GROUP => [ $this, 'get_ad_by_group' ],
self::PLACEMENT => [ $this, 'get_ad_by_placement' ],
];
$this->methods = apply_filters( 'advanced-ads-ad-select-methods', $methods );
}
return $this->methods;
}
/**
* Advanced ad selection methods should not directly rely on
* current environment factors.
* Prior to actual ad selection the meta is provided to allow for
* serialised, proxied or otherwise defered selection workflows.
*
* @param string $method Ad selection method.
* @param int $id Ad ID.
* @param array $args Ad selection arguments.
*
* @return array
*/
public function get_ad_arguments( $method, $id, $args = [] ) {
$args = (array) $args;
$args['previous_id'] = $args['id'] ?? null;
$args['previous_method'] = $args['method'] ?? null;
if ( $id || ! isset( $args['id'] ) ) {
$args['id'] = $id;
}
$args['method'] = $method;
$args = apply_filters( 'advanced-ads-ad-select-args', $args, $method, $id );
return $args;
}
/**
* Get ad by method.
*
* @param int $id Ad ID.
* @param string $method Ad selection method.
* @param array $args Ad selection arguments.
*
* @return string
*/
public function get_ad_by_method( $id, $method, $args = [] ) {
$methods = $this->get_methods();
if ( ! isset( $methods[ $method ] ) ) {
return;
}
if ( ! advads_can_display_ads() ) {
return;
}
$args = $this->get_ad_arguments( $method, $id, $args );
return call_user_func( $methods[ $method ], $args );
}
/**
* Get ad by ID.
*
* @param array $args Ad selection arguments.
*
* @return string
*/
public function get_ad_by_id( $args ) {
return get_the_ad( $args['id'], '', $args );
}
/**
* Get ad by group.
*
* @param array $args Ad selection arguments.
*
* @return string
*/
public function get_ad_by_group( $args ) {
return get_the_group( $args['id'], '', $args );
}
/**
* Get ad by placement.
*
* @param array $args Ad selection arguments.
*
* @return string
*/
public function get_ad_by_placement( $args ) {
return get_the_placement( $args['id'], '', $args );
}
}

View File

@@ -0,0 +1,16 @@
<?php // phpcs:ignoreFileName
/**
* Ad model
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
*/
/**
* Ad model
*
* @since 1.1.0
* @deprecated 1.53.0
*/
class Advanced_Ads_Ad {
}

View File

@@ -0,0 +1,16 @@
<?php // phpcs:ignoreFileName
/**
* Group model
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
*/
/**
* Group model
*
* @since 1.1.0
* @deprecated 1.53.0
*/
class Advanced_Ads_Group {
}

View File

@@ -0,0 +1,15 @@
<?php // phpcs:ignoreFileName
/**
* Placement model
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
*/
/**
* Placement model
*
* @since 1.1.0
* @deprecated 1.53.0
*/
class Advanced_Ads_Placements {}

View File

@@ -0,0 +1,16 @@
<?php // phpcs:ignoreFileName
/**
* Advanced Ads Abstract Ad Type
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
*/
/**
* Abstract class for ad types
*
* @since 1.0.0
* @deprecated 1.53.0
*/
class Advanced_Ads_Ad_Type_Abstract {}

View File

@@ -0,0 +1,10 @@
<?php // phpcs:ignoreFilename
defined( 'ABSPATH' ) || exit;
/**
* Advanced Ads Content Ad Type
*
* @deprecated 1.48.2
*/
class Advanced_Ads_Ad_Type_Content {}

View File

@@ -0,0 +1,10 @@
<?php // phpcs:ignoreFilename
defined( 'ABSPATH' ) || exit;
/**
* Advanced Ads Dummy Ad Type
*
* @deprecated 1.48.2
*/
class Advanced_Ads_Ad_Type_Dummy {}

View File

@@ -0,0 +1,10 @@
<?php // phpcs:ignoreFilename
defined( 'ABSPATH' ) || exit;
/**
* Advanced Ads Plain Ad Type
*
* @deprecated 1.48.2
*/
class Advanced_Ads_Ad_Type_Group {}

View File

@@ -0,0 +1,10 @@
<?php // phpcs:ignoreFilename
defined( 'ABSPATH' ) || exit;
/**
* Advanced Ads Image Ad Type
*
* @deprecated 1.48.2
*/
class Advanced_Ads_Ad_Type_Image {}

View File

@@ -0,0 +1,10 @@
<?php // phpcs:ignoreFilename
defined( 'ABSPATH' ) || exit;
/**
* Advanced Ads Plain Ad Type
*
* @deprecated 1.48.2
*/
class Advanced_Ads_Ad_Type_Plain {}

View File

@@ -0,0 +1,44 @@
<?php // phpcs:ignore WordPress.Files.FileName
/**
* Advanced Ads main admin class
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 1.0.0
*/
use AdvancedAds\Utilities\Conditional;
defined( 'ABSPATH' ) || exit;
/**
*
* Admin class.
*
* @deprecated 2.0.0
*/
class Advanced_Ads_Admin {
/**
* Check if the current screen belongs to Advanced Ads
*
* @deprecated 1.47.0
*
* @return bool
*/
public static function screen_belongs_to_advanced_ads() {
_deprecated_function( __METHOD__, '1.47.0', '\AdvancedAds\Utilities\Conditional::is_screen_advanced_ads()' );
return Conditional::is_screen_advanced_ads();
}
/**
* Get DateTimeZone object for the WP installation
*
* @return DateTimeZone object set in WP settings.
* @see Advanced_Ads_Utils::get_wp_timezone()
*
* @deprecated This is also used outside of admin as well as other plugins.
*/
public static function get_wp_timezone() {
return Advanced_Ads_Utils::get_wp_timezone();
}
}

View File

@@ -0,0 +1,69 @@
<?php
/**
* Plugin file
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
*/
/**
* WordPress integration and definitions:
*
* @deprecated 2.0 Use Advanced_Ads
*/
class Advanced_Ads_Plugin {
/**
* Instance of Advanced_Ads_Plugin
*
* @var object Advanced_Ads_Plugin
*/
protected static $instance;
/**
* Plugin options
*
* @var array $options
*/
protected $options;
/**
* Get instance of Advanced_Ads_Plugin
*/
public static function get_instance() {
_deprecated_file( __CLASS__, '2.0', 'Advanced_Ads' );
// If the single instance hasn't been set, set it now.
if ( null === self::$instance ) {
self::$instance = new self();
}
return self::$instance;
}
/**
* Return plugin options these are the options updated by the user
*
* @deprecated 2.0 Use AdvancedAds\Options class instead.
*
* @return array $options
*/
public function options() {
_deprecated_function( __METHOD__, '2.0', "AdvancedAds\Options::get_instance()->get_options('advanced-ads')" );
return Advanced_Ads::get_instance()->options();
}
/**
* Get prefix used for frontend elements
*
* @deprecated 2.0 Use wp_advads()->get_frontend_prefix().
*
* @return string
*/
public function get_frontend_prefix() {
_deprecated_function( __METHOD__, '2.0', 'wp_advads()->get_frontend_prefix()' );
return wp_advads()->get_frontend_prefix();
}
}

View File

@@ -0,0 +1,52 @@
<?php
/**
* The functions graveyard.
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
* @since 2.0.0
*/
/**
* Return ad content
*
* @since 1.0.0
* @deprecated 2.0.0
*
* @param int $id Id of the ad (post).
* @param array $args Additional arguments.
*/
function get_ad( $id = 0, $args = [] ) {
_deprecated_function( __FUNCTION__, '2.0.0', 'get_the_ad' );
return get_the_ad( $id, '', $args );
}
/**
* Return an ad from an ad group based on ad weight
*
* @since 1.0.0
* @deprecated 2.0.0
*
* @param int $id Id of the ad group (taxonomy).
* @param array $args Additional arguments.
*/
function get_ad_group( $id = 0, $args = [] ) {
_deprecated_function( __FUNCTION__, '2.0.0', 'get_the_group' );
return get_the_group( $id, '', $args );
}
/**
* Return content of an ad placement
*
* @since 1.1.0
* @deprecated 2.0.0
*
* @param string $id Slug of the ad placement.
* @param array $args Additional arguments.
*/
function get_ad_placement( $id = '', $args = [] ) {
_deprecated_function( __FUNCTION__, '2.0.0', 'get_the_placement' );
return get_the_placement( $id, '', $args );
}

View File

@@ -0,0 +1,10 @@
<?php // phpcs:ignoreFile
defined( 'ABSPATH' ) || exit;
/**
* Google Adsense Dymmu Type
*
* @deprecated 1.52.0
*/
class Dummy_Type {}

View File

@@ -0,0 +1,30 @@
<?php
/**
* Render ad label position option for placements.
*
* @deprecated 1.52.1
*
* @var string $_placement_slug slug of the current placement.
* @var string $_position value of the position option.
* @var bool $_clearfix value of the position clearfix option.
*/
?>
<label title="<?php esc_html_e( 'default', 'advanced-ads' ); ?>">
<input type="radio" name="advads[placements][<?php echo esc_attr( $_placement_slug ); ?>][options][placement_position]" value="" <?php checked( $_position, 'default' ); ?>/>
<?php esc_html_e( 'default', 'advanced-ads' ); ?>
</label>
<label title="<?php esc_html_e( 'left', 'advanced-ads' ); ?>">
<input type="radio" name="advads[placements][<?php echo esc_attr( $_placement_slug ); ?>][options][placement_position]" value="left" <?php checked( $_position, 'left' ); ?>/>
<?php esc_html_e( 'left', 'advanced-ads' ); ?></label>
<label title="<?php esc_html_e( 'center', 'advanced-ads' ); ?>">
<input type="radio" name="advads[placements][<?php echo esc_attr( $_placement_slug ); ?>][options][placement_position]" value="center" <?php checked( $_position, 'center' ); ?>/>
<?php esc_html_e( 'center', 'advanced-ads' ); ?></label>
<label title="<?php esc_html_e( 'right', 'advanced-ads' ); ?>">
<input type="radio" name="advads[placements][<?php echo esc_attr( $_placement_slug ); ?>][options][placement_position]" value="right" <?php checked( $_position, 'right' ); ?>/>
<?php esc_html_e( 'right', 'advanced-ads' ); ?></label>
<p><label>
<input type="checkbox" name="advads[placements][<?php echo esc_attr( $_placement_slug ); ?>][options][placement_clearfix]" value="1" <?php checked( $_clearfix, 1 ); ?>/>
<?php
esc_html_e( 'Check this if you dont want the following elements to float around the ad. (adds a placement_clearfix)', 'advanced-ads' );
?>
</label></p>