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,69 @@
<?php
/**
* Displays the placement test table.
*
* @package AdvancedAds\Pro
*
* @var array $placement_tests The array with saved tests.
*/
if ( count( $placement_tests ) ) : ?>
<h2><?php esc_html_e( 'Placement tests', 'advanced-ads-pro' ); ?></h2>
<div id="placement-tests">
<table class="form-table advads-placement-tests-table striped">
<thead>
<tr>
<th><?php esc_html_e( 'Author', 'advanced-ads-pro' ); ?></th>
<th><?php esc_html_e( 'Expiry date', 'advanced-ads-pro' ); ?></th>
<th><?php esc_html_e( 'Placements', 'advanced-ads-pro' ); ?></th>
<th></th>
</tr>
</thead>
<tbody>
<?php
foreach ( $placement_tests as $slug => $placement_test ) :
$placement_names = $this->get_placement_names( $placement_test );
$is_empty_test = count( $placement_names ) < 2;
$p_user_login = '';
if ( isset( $placement_test['user_id'] ) ) {
$user = get_user_by( 'ID', $placement_test['user_id'] );
if ( $user ) {
$p_user_login = $user->user_login;
}
}
?>
<tr>
<td>
<?php echo esc_html( $p_user_login ); ?>
</td>
<td>
<?php
if ( ! $is_empty_test ) {
$expiry_date = $placement_test['expiry_date'] ?? false;
$this->output_expiry_date_form( $slug, $expiry_date );
}
?>
</td>
<td>
<?php
if ( ! $is_empty_test ) {
echo wp_kses_post( implode( _x( ' vs ', 'placement tests', 'advanced-ads-pro' ), $placement_names ) );
} else {
?>
<span class="advads-notice-inline advads-error"><?php echo esc_html_x( 'empty', 'placement tests', 'advanced-ads-pro' ); ?> </span>
<?php
}
?>
</td>
<td>
<label><input type="checkbox" name="advads[placement_tests][<?php echo esc_attr( $slug ); ?>][delete]" value="1" /> <?php echo esc_html_x( 'delete', 'checkbox to remove placement test', 'advanced-ads-pro' ); ?></label>
</td>
<tr>
<?php endforeach; ?>
</tbody>
</table>
<p>
<input type="submit" class="button button-primary" id="update-placement-tests" value="<?php esc_html_e( 'Save Tests', 'advanced-ads-pro' ); ?>"/>
</p>
</div>
<?php endif; ?>

View File

@@ -0,0 +1,28 @@
<?php //phpcs:ignoreFile
/**
* Placements test weights markup
*
* @package AdvancedAds
* @author Advanced Ads <info@wpadvancedads.com>
*
* @var \AdvancedAds\Abstracts\Placement $placement placement of the current row.
*/
$test_id = $placement->get_prop( 'test_id' );
?>
<?php if ( $test_id ) : ?>
<input type="hidden" name="advads[placements][options][test_id]" value="<?php echo esc_attr( $test_id ); ?>"/>
<?php echo esc_html_x( 'Testing', 'placement tests', 'advanced-ads-pro' ); ?>
<?php else: ?>
<label><?php _e( 'Test weight', 'advanced-ads-pro' ); ?>
<select class="advads-add-to-placement-test" data-slug="<?php echo esc_attr( $placement->get_slug() ); ?>">
<option value=""></option>
<?php for ( $i = 1; $i <= 10; $i++ ) : ?>
<option value="<?php echo $i; ?>"><?php echo $i; ?></option>
<?php endfor; ?>
</select>
</label>
<?php endif; ?>
<br/>
<br/>
<a href="#" class="save-new-test button button-primary hidden"><?php esc_html_e( 'Save new test', 'advanced-ads-pro' ); ?></a>

View File

@@ -0,0 +1,35 @@
<?php // phpcs:ignoreFile ?>
<div id="advanced-ads-expiry-date-<?php echo $slug; ?>">
<label>
<input onclick="advads_toggle_box( this, '#advanced-ads-expiry-date-<?php echo $slug; ?> .inner' )" type="checkbox" id="advanced-ads-expiry-date-enable" name="advads[placement_tests][<?php echo $slug; ?>][expiry_date][enabled]"
value="1" <?php checked( $enabled, 1 ); ?>/><?php _ex( 'Send email after', 'placement tests', 'advanced-ads-pro' ); ?>&nbsp;(<?php echo Advanced_Ads_Utils::get_timezone_name(); ?>)
</label>
<br/>
<div class="inner" <?php if ( ! $enabled ) : ?>style="display:none;"<?php endif; ?>>
<?php
global $wp_locale;
$month = '<label><span class="screen-reader-text">' . __( 'Month', 'advanced-ads-pro' ) . '</span><select class="advads-mm" name="advads[placement_tests][' . $slug . '][expiry_date][month]"' . ">\n";
for ( $i = 1; $i < 13; $i = $i + 1 ) {
$monthnum = zeroise( $i, 2 );
$month .= "\t\t\t" . '<option value="' . $monthnum . '" ' . selected( $curr_month, $monthnum, false ) . '>';
/* translators: 1: month number (01, 02, etc.), 2: month abbreviation */
$month .= sprintf( _x( '%1$s-%2$s', '1: month number (01, 02, etc.), 2: month abbreviation', 'advanced-ads-pro' ),
$monthnum, $wp_locale->get_month_abbrev( $wp_locale->get_month( $i ) ) ) . "</option>\n";
}
$month .= '</select></label>';
$day = '<label><span class="screen-reader-text">' . __( 'Day', 'advanced-ads-pro' ) . '</span><input type="text" class="advads-jj" name="advads[placement_tests][' . $slug . '][expiry_date][day]" value="' . $curr_day . '" size="2" maxlength="2" autocomplete="off" /></label>';
$year = '<label><span class="screen-reader-text">' . __( 'Year', 'advanced-ads-pro' ) . '</span><input type="text" class="advads-aa" name="advads[placement_tests][' . $slug . '][expiry_date][year]" value="' . $curr_year . '" size="4" maxlength="4" autocomplete="off" /></label>';
$hour = '<label><span class="screen-reader-text">' . __( 'Hour', 'advanced-ads-pro' ) . '</span><input type="text" class="advads-hh" name="advads[placement_tests][' . $slug . '][expiry_date][hour]" value="' . $curr_hour . '" size="2" maxlength="2" autocomplete="off" /></label>';
$minute = '<label><span class="screen-reader-text">' . __( 'Minute', 'advanced-ads-pro' ) . '</span><input type="text" class="advads-mn" name="advads[placement_tests][' . $slug . '][expiry_date][minute]" value="' . $curr_minute . '" size="2" maxlength="2" autocomplete="off" /></label>';
?>
<fieldset class="advads-timestamp">
<?php
/* translators: 1: month, 2: day, 3: year, 4: hour, 5: minute */
printf( _x( '%1$s %2$s, %3$s @ %4$s %5$s', 'order of expiry date fields 1: month, 2: day, 3: year, 4: hour, 5: minute', 'advanced-ads-pro' ), $month, $day, $year, $hour, $minute );
?>
</fieldset>
</div>
</div>