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
/**
* Templace for the Group display condition.
*
* @var array $groups List of BuddyBoss groups.
* @var array $values Selected groups.
* @var string $rand Unique identifier of the current metabox.
* @var string $name Form name attribute.
*/
?>
<input type="hidden" name="<?php echo esc_attr( $name ); ?>[type]" value="<?php echo esc_attr( $options['type'] ); ?>"/>
<div class="advads-conditions-single advads-buttonset">
<?php
foreach ( $groups as $_group_id => $_group_name ) {
$_val = in_array( $_group_id, $values, true ) ? 1 : 0;
$_label = sprintf( '%s (%s)', $_group_name, $_group_id );
$field_id = "advads-conditions-$_group_id-$rand";
?>
<label class="button" for="<?php echo esc_attr( $field_id ); ?>"><?php echo esc_html( $_label ); ?></label><input
type="checkbox"
id="<?php echo esc_attr( $field_id ); ?>"
name="<?php echo esc_attr( $name ); ?>[value][]" <?php checked( $_val, 1 ); ?>
value="<?php echo esc_attr( $_group_id ); ?>">
<?php
}

View File

@@ -0,0 +1,59 @@
<?php
/**
* Render position option for the BuddyPress Content placement
*
* @package AdvancedAds\Pro
* @author Advanced Ads <info@wpadvancedads.com>
*
* @var string $placement_slug slug of the placement
* @var array $buddypress_positions available positions (hooks)
* @var string $current currently selected position
* @var int $index value of index option
* @var string $activity_type Activity Type
* @var bool $hook_repeat Whether to repeat the hook
*/
use AdvancedAds\Pro\Modules\BuddyPress\BuddyPress;
?>
<div class="advads-option">
<span><?php esc_html_e( 'position', 'advanced-ads-pro' ); ?></span>
<div>
<?php if ( BuddyPress::is_legacy_theme() ) : ?>
<select name="advads[placements][options][buddypress_hook]">
<?php foreach ( $buddypress_positions as $_group => $_positions ) : ?>
<optgroup label="<?php echo esc_html( $_group ); ?>">
<?php foreach ( $_positions as $_position_key => $_position_title ) : ?>
<option value="<?php echo esc_attr( $_position_key ); ?>" <?php selected( $_position_key, $current ); ?>><?php echo esc_html( $_position_title ); ?></option>
<?php endforeach; ?>
</optgroup>
<?php endforeach; ?>
</select>
<?php endif; ?>
<p>
<?php
printf(
/* translators: %s is an HTML input element. */
esc_html__( 'Inject after %s. entry', 'advanced-ads-pro' ),
'<input type="number" required="required" min="1" name="advads[placements][options][pro_buddypress_pages_index]" value="' . absint( $index ) . '"/>'
);
?>
</p>
<p>
<label><input type="checkbox" name="advads[placements][options][hook_repeat]" value="1" <?php checked( $hook_repeat ); ?>><?php esc_html_e( 'repeat the position', 'advanced-ads-pro' ); ?></label>
</p>
</div>
</div>
<?php if ( ! BuddyPress::is_legacy_theme() ) : ?>
<div class="advads-option">
<span><?php esc_html_e( 'Stream', 'advanced-ads-pro' ); ?></span>
<div class="advads-buddypress-placement-activity">
<label><input name="advads[placements][options][activity_type]" value="any" type="radio" <?php checked( $activity_type, 'any' ); ?>><?php esc_html_e( 'any', 'advanced-ads-pro' ); ?></label>
<label><input name="advads[placements][options][activity_type]" value="sitewide" type="radio" <?php checked( $activity_type, 'sitewide' ); ?>><?php esc_html_e( 'activity stream', 'advanced-ads-pro' ); ?></label>
<label><input name="advads[placements][options][activity_type]" value="group" type="radio" <?php checked( $activity_type, 'group' ); ?>><?php esc_html_e( 'group feed', 'advanced-ads-pro' ); ?></label>
<label><input name="advads[placements][options][activity_type]" value="member" type="radio" <?php checked( $activity_type, 'member' ); ?>><?php esc_html_e( 'member timeline', 'advanced-ads-pro' ); ?></label>
</div>
</div>
<?php endif; ?>

View File

@@ -0,0 +1,75 @@
<?php
/**
* Render xprofile visitor condition settions.
*
* @package AdvancedAds\Pro\Modules\BuddyPress
* @author Advanced Ads <info@wpadvancedads.com>
*
* @var string $name Base name of the setting.
* @var array $options Condition options.
* @var array $groups BuddyPress field groups.
* @var int $field Field option.
* @var string $value Value option.
* @var array $type_options Options for the condition type.
* @var string $current_field_type Current field type.
*/
use AdvancedAds\Pro\Modules\BuddyPress\BuddyPress;
$manual_link = BuddyPress::is_buddyboss()
? 'https://wpadvancedads.com/manual/buddyboss-ads/?utm_source=advanced-ads&utm_medium=link&utm_campaign=condition-buddyboss-profile-fields'
: 'https://wpadvancedads.com/ads-on-buddypress-pages/?utm_source=advanced-ads&utm_medium=link&utm_campaign=condition-buddypress-profile-fields';
?><input type="hidden" name="<?php echo esc_attr( $name ); ?>[type]" value="<?php echo esc_attr( $options['type'] ); ?>"/>
<?php
if ( $groups ) :
?>
<div class="advads-conditions-select-wrap">
<select class="advads-pro-buddyboss-xprofile-field-type" data-field-name="<?php echo esc_attr( $name ); ?>" name="<?php echo esc_attr( $name ); ?>[field]">
<?php
foreach ( $groups as $_group ) :
?>
<optgroup label="<?php echo esc_html( $_group->name ); ?>">
<?php
if ( $_group->fields ) {
foreach ( $_group->fields as $_field ) :
$field_type = self::FIELD_MEMBERTYPES === $_field->type ? self::FIELD_MEMBERTYPES : self::FIELD_TEXTBOX;
?>
<option value="<?php echo esc_attr( $_field->id ); ?>" data-field-type="<?php echo esc_attr( $field_type ); ?>" <?php selected( $field, $_field->id ); ?>>
<?php echo esc_html( $_field->name ); ?>
</option>
<?php
endforeach;
}
?>
</optgroup>
<?php
endforeach;
?>
</select>
</div>
<?php
else :
?>
<p class="advads-notice-inline advads-error">
<?php
/* translators: "profile fields" relates to BuddyPress profile fields */
esc_html_e( 'No profile fields found', 'advanced-ads-pro' );
?>
</p>
<?php
endif;
if ( 0 <= version_compare( ADVADS_VERSION, '1.9.1' ) ) {
include ADVADS_ABSPATH . 'admin/views/ad-conditions-string-operators.php';
}
AdvancedAds\Pro\Modules\BuddyPress\Admin::render_xprofile_field( $name, $current_field_type, $value );
?>
<br class="clear" />
<br />
<p class="description">
<?php echo esc_html( $type_options[ $options['type'] ]['description'] ); ?>
<a href="<?php echo esc_url( $manual_link ); ?>" class="advads-manual-link" target="_blank"><?php esc_html_e( 'Manual', 'advanced-ads-pro' ); ?></a>
</p>