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,61 @@
<?php
/**
* Thrive Themes - https://thrivethemes.com
*
* @package thrive-visual-editor
*/
namespace TCB\ConditionalDisplay\Fields\User;
use TCB\ConditionalDisplay\Field;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Silence is golden!
}
class Last_Logged_In extends Field {
/**
* @return string
*/
public static function get_entity() {
return 'user_data';
}
/**
* @return string
*/
public static function get_key() {
return 'last_logged_in';
}
public static function get_label() {
return esc_html__( 'Last logged in', 'thrive-cb' );
}
public static function get_conditions() {
return [ 'date_and_time_with_intervals' ];
}
public function get_value( $user_data ) {
$last_logged_in = '';
if ( $user_data ) {
$user_meta = get_user_meta( $user_data->ID );
if ( isset( $user_meta['tve_last_login'] ) && is_array( $user_meta['tve_last_login'] ) ) {
$last_logged_in = date( 'Y-m-d H:i:s', (int) $user_meta['tve_last_login'][0] );
}
}
return $last_logged_in;
}
/**
* Determines the display order in the modal field select
*
* @return int
*/
public static function get_display_order() {
return 10;
}
}

View File

@@ -0,0 +1,67 @@
<?php
/**
* Thrive Themes - https://thrivethemes.com
*
* @package thrive-visual-editor
*/
namespace TCB\ConditionalDisplay\Fields\User;
use TCB\ConditionalDisplay\Field;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Silence is golden!
}
class Number_Of_Comments extends Field {
/**
* @return string
*/
public static function get_entity() {
return 'user_data';
}
/**
* @return string
*/
public static function get_key() {
return 'number_of_comments';
}
public static function get_label() {
return esc_html__( 'Number of comments', 'thrive-cb' );
}
public static function get_conditions() {
return [ 'number_comparison' ];
}
public function get_value( $user_data ) {
$comments_count = 0;
if ( ! empty( $user_data ) ) {
$args = [
'author_email' => $user_data->user_email,
'no_found_rows' => false,
'number' => 10,
'status' => 'all,spam,trash',
];
$query = new \WP_Comment_Query;
$query->query( $args );
$comments_count = (int) $query->found_comments;
}
return $comments_count;
}
/**
* Determines the display order in the modal field select
*
* @return int
*/
public static function get_display_order() {
return 25;
}
}

View File

@@ -0,0 +1,73 @@
<?php
/**
* Thrive Themes - https://thrivethemes.com
*
* @package thrive-visual-editor
*/
namespace TCB\ConditionalDisplay\Fields\User;
use TCB\ConditionalDisplay\Field;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Silence is golden!
}
class User_Id extends Field {
/**
* @return string
*/
public static function get_entity() {
return 'user_data';
}
/**
* @return string
*/
public static function get_key() {
return 'user_id';
}
public static function get_label() {
return esc_html__( 'Username', 'thrive-cb' );
}
public static function get_conditions() {
return [ 'autocomplete' ];
}
public function get_value( $user_data ) {
return empty( $user_data ) ? '' : $user_data->ID;
}
public static function get_options( $selected_values = [], $searched_keyword = '' ) {
$users = [];
foreach ( get_users() as $user ) {
if ( static::filter_options( $user->ID, $user->data->user_login, $selected_values, $searched_keyword ) ) {
$users[] = [
'value' => (string) $user->ID,
'label' => $user->data->user_login,
];
}
}
return $users;
}
/**
* @return string
*/
public static function get_placeholder_text() {
return esc_html__( 'Search users', 'thrive-cb' );
}
/**
* Determines the display order in the modal field select
*
* @return int
*/
public static function get_display_order() {
return 20;
}
}

View File

@@ -0,0 +1,55 @@
<?php
/**
* Thrive Themes - https://thrivethemes.com
*
* @package thrive-visual-editor
*/
namespace TCB\ConditionalDisplay\Fields\User;
use TCB\ConditionalDisplay\Field;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Silence is golden!
}
class User_Is_Logged_In extends Field {
/**
* @return string
*/
public static function get_entity() {
return 'user_data';
}
/**
* @return string
*/
public static function get_key() {
return 'is_logged_in';
}
public static function get_label() {
return esc_html__( 'Is logged in', 'thrive-cb' );
}
public static function get_conditions() {
return [];
}
public function get_value( $user_data ) {
return ! empty( $user_data );
}
public static function is_boolean() {
return true;
}
/**
* Determines the display order in the modal field select
*
* @return int
*/
public static function get_display_order() {
return 0;
}
}

View File

@@ -0,0 +1,45 @@
<?php
/**
* Thrive Themes - https://thrivethemes.com
*
* @package thrive-visual-editor
*/
namespace TCB\ConditionalDisplay\Fields\User;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Silence is golden!
}
class User_Is_Not_Logged_In extends User_Is_Logged_In {
/**
* @return string
*/
public static function get_entity() {
return 'user_data';
}
/**
* @return string
*/
public static function get_key() {
return 'is_not_logged_in';
}
public static function get_label() {
return esc_html__( 'Is not logged in', 'thrive-cb' );
}
public function get_value( $user_data ) {
return empty( $user_data );
}
/**
* Determines the display order in the modal field select
*
* @return int
*/
public static function get_display_order() {
return 1;
}
}

View File

@@ -0,0 +1,51 @@
<?php
/**
* Thrive Themes - https://thrivethemes.com
*
* @package thrive-visual-editor
*/
namespace TCB\ConditionalDisplay\Fields\User;
use TCB\ConditionalDisplay\Field;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Silence is golden!
}
class User_Registration_Date extends Field {
/**
* @return string
*/
public static function get_entity() {
return 'user_data';
}
/**
* @return string
*/
public static function get_key() {
return 'user_registration_date';
}
public static function get_label() {
return esc_html__( 'Registration date', 'thrive-cb' );
}
public static function get_conditions() {
return [ 'date_and_time_with_intervals' ];
}
public function get_value( $user_data ) {
return empty( $user_data ) ? '' : $user_data->user_registered;
}
/**
* Determines the display order in the modal field select
*
* @return int
*/
public static function get_display_order() {
return 15;
}
}

View File

@@ -0,0 +1,67 @@
<?php
/**
* Thrive Themes - https://thrivethemes.com
*
* @package thrive-visual-editor
*/
namespace TCB\ConditionalDisplay\Fields\User;
use TCB\ConditionalDisplay\Field;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Silence is golden!
}
class User_Role extends Field {
/**
* @return string
*/
public static function get_entity() {
return 'user_data';
}
/**
* @return string
*/
public static function get_key() {
return 'user_role';
}
public static function get_label() {
return esc_html__( 'Role', 'thrive-cb' );
}
public static function get_conditions() {
return [ 'checkbox' ];
}
public function get_value( $user_data ) {
return empty( $user_data ) ? '' : $user_data->roles;
}
public static function get_options( $selected_values = [], $search = '' ) {
$roles = [];
if ( ! function_exists( 'get_editable_roles' ) ) {
require_once ABSPATH . '/wp-admin/includes/user.php';
}
foreach ( get_editable_roles() as $key => $role ) {
$roles[ $key ] = [
'label' => $role['name'],
'value' => $key,
];
}
return $roles;
}
/**
* Determines the display order in the modal field select
*
* @return int
*/
public static function get_display_order() {
return 5;
}
}