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,58 @@
<?php
/**
* Thrive Themes - https://thrivethemes.com
*
* @package thrive-apprentice
*/
namespace TVE\Architect\ConditionalDisplay;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Silence is golden!
}
/**
* Class Main
*
* @package TVE\Architect\ConditionalDisplay
*/
class Main {
public static function init() {
static::load_classes( 'entities', 'entity' );
static::load_classes( 'fields', 'field' );
}
public static function load_classes( $folder, $type ) {
$path = __DIR__ . '/' . $folder;
if ( is_dir( $path ) ) {
foreach ( array_diff( scandir( $path ), [ '.', '..' ] ) as $item ) {
if ( static::should_load( $item ) ) {
require_once $path . '/' . $item;
if ( preg_match( '/class-(.*).php/m', $item, $m ) && ! empty( $m[1] ) ) {
$class_name = \TCB_ELEMENTS::capitalize_class_name( $m[1] );
$class = __NAMESPACE__ . '\\' . ucfirst( $folder ) . '\\' . $class_name;
$register_fn = 'tve_register_condition_' . $type;
$register_fn( $class );
}
}
}
}
}
public static function wpfusion_exists() {
return function_exists( 'wp_fusion' );
}
public static function should_load( $filename ) {
$load = true;
if ( strpos( basename( $filename, '.php' ), '-wpfusion-' ) !== false && ! static::wpfusion_exists() ) {
$load = false;
}
return $load;
}
}

View File

@@ -0,0 +1,64 @@
<?php
/**
* Thrive Themes - https://thrivethemes.com
*
* @package thrive-apprentice
*/
namespace TVE\Architect\ConditionalDisplay\Fields;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Silence is golden!
}
class User_Wpfusion_Tags extends \TCB\ConditionalDisplay\Field {
/**
* @return string
*/
public static function get_key() {
return 'user_wpfusion_tags';
}
public static function get_label() {
return __( 'Has WP Fusion tags', 'thrive-dash' );
}
public static function get_conditions() {
return [ 'autocomplete_hidden' ];
}
/**
* @return string
*/
public static function get_entity() {
return 'user_data';
}
public function get_value( $user_data ) {
$tags = '';
if ( ! empty( $user_data ) && ! empty( $user_data->ID ) ) {
$tags = wp_fusion()->user->get_tags( $user_data->ID );
}
return empty( $tags ) ? '' : $tags;
}
public static function get_options( $selected_values = [], $searched_keyword = '' ) {
$tag_options = [];
foreach ( wp_fusion()->settings->get_available_tags_flat() as $key => $tag ) {
if ( static::filter_options( $key, $tag, $selected_values, $searched_keyword ) ) {
$tag_options[] = [
'value' => (string) $key,
'label' => $tag,
];
}
}
return $tag_options;
}
public static function get_autocomplete_placeholder() {
return __( 'Search tags', 'thrive-dash' );
}
}