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,136 @@
<?php
/**
* Thrive Themes - https://thrivethemes.com
*
* @package TCB2.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Silence is golden
}
class TCB_Lead_Generation_Checkbox_Element extends TCB_Element_Abstract {
public function name() {
return __( 'Form Checkbox', 'thrive-cb' );
}
public function identifier() {
return '.tve_lg_checkbox.tve-new-checkbox:not(.tcb-lg-consent):not(.tcb-remember-me)';
}
public function hide() {
return true;
}
public function own_components() {
$components = array(
'lead_generation_checkbox' => array(
'config' => array(
'ShowLabel' => array(
'config' => array(
'label' => __( 'Show Label', 'thrive-cb' ),
),
'extends' => 'Switch',
),
'Required' => array(
'config' => array(
'default' => false,
'label' => __( 'Required field' ),
'info' => true,
),
'extends' => 'Switch',
),
'ColumnNumber' => array(
'to' => '.tve-checkbox-grid',
'config' => array(
'default' => '1',
'min' => '1',
'max' => '5',
'limit' => '5',
'label' => __( 'Columns', 'thrive-cb' ),
'um' => [],
),
'extends' => 'Slider',
),
'VerticalSpace' => array(
'to' => '.tve-checkbox-grid',
'config' => array(
'default' => '0',
'min' => '0',
'max' => '300',
'label' => __( 'Vertical Space', 'thrive-cb' ),
'um' => [ 'px', '%' ],
'css' => '--v-gutter',
),
'extends' => 'Slider',
),
'HorizontalSpace' => array(
'to' => '.tve-checkbox-grid',
'config' => array(
'default' => '20',
'min' => '0',
'max' => '100',
'label' => __( 'Horizontal Space', 'thrive-cb' ),
'um' => [ 'px', '%' ],
'css' => '--h-gutter',
),
'extends' => 'Slider',
),
'OptionsList' => array(
'config' => array(
'sortable' => true,
'settings_icon' => 'pen-light',
'marked' => true,
'marking_text' => __( 'Set as default', 'thrive-cb' ),
'marking_icon' => 'check',
'marked_field' => 'default',
),
),
'AnswerTag' => array(
'config' => array(
'default' => false,
'label' => __( 'Send answer(s) as tag', 'thrive-cb' ),
'info' => true,
),
'extends' => 'Switch',
),
),
),
'typography' => [
'hidden' => true,
],
'layout' => [
'disabled_controls' => [
'Width',
'Height',
'Alignment',
'.tve-advanced-controls',
'hr',
],
'config' => [],
],
'borders' => [
'config' => [],
],
'animation' => [
'hidden' => true,
],
'background' => [
'config' => [],
],
'shadow' => [
'hidden' => true,
],
'styles-templates' => [
'config' => [],
],
'responsive' => [
'hidden' => true,
],
);
return array_merge( $components, $this->group_component() );
}
}

View File

@@ -0,0 +1,179 @@
<?php
/**
* Thrive Themes - https://thrivethemes.com
*
* @package TCB2.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Silence is golden
}
class TCB_Lead_Generation_Checkbox_Option_Element extends TCB_Element_Abstract {
public function name() {
return __( 'Form Checkbox Option', 'thrive-cb' );
}
public function identifier() {
return '.tve-new-checkbox:not(.tcb-lg-consent) .tve_lg_checkbox_wrapper';
}
public function hide() {
return true;
}
/**
* @return bool
*/
public function has_hover_state() {
return true;
}
/**
* @inheritDoc
*/
public function expanded_state_config() {
return true;
}
/**
* @inheritDoc
*/
public function expanded_state_label() {
return __( 'Selected', 'thrive-cb' );
}
public function own_components() {
$prefix_config = tcb_selection_root() . ' ';
return array(
'lead_generation_checkbox_option' => array(
'config' => array(
'CheckboxPalettes' => array(
'config' => [],
'extends' => 'Palettes',
'important' => apply_filters( 'tcb_lg_color_inputs_important', true ),
),
'LabelAsValue' => array(
'config' => array(
'name' => '',
'label' => __( 'Use label as value', 'thrive-cb' ),
'default' => true,
'info' => true,
),
'extends' => 'Switch',
),
'InputValue' => array(
'config' => array(
'label' => __( 'Value', 'thrive-cb' ),
),
'extends' => 'LabelInput',
),
'SetAsDefault' => array(
'config' => array(
'name' => '',
'label' => __( 'Set as default', 'thrive-cb' ),
'default' => false,
),
'extends' => 'Switch',
),
'CheckboxSize' => array(
'css_suffix' => ' .tve-checkmark',
'config' => array(
'default' => '20',
'min' => '0',
'max' => '30',
'label' => __( 'Checkbox Size', 'thrive-cb' ),
'um' => [ 'px' ],
),
'extends' => 'Slider',
),
'StyleChange' => array(
'config' => array(
'label' => __( 'Checkbox Style', 'thrive-cb' ),
'preview' => [
'key' => '',
'label' => 'default',
],
),
),
'CheckboxStylePicker' => array(
'config' => array(
'label' => __( 'Choose checkbox style', 'thrive-cb' ),
'items' => array(
'default' => __( 'Default', 'thrive-cb' ),
'style-1' => __( 'Style 1', 'thrive-cb' ),
'style-2' => __( 'Style 2', 'thrive-cb' ),
'style-3' => __( 'Style 3', 'thrive-cb' ),
'style-4' => __( 'Style 4', 'thrive-cb' ),
'style-5' => __( 'Style 5', 'thrive-cb' ),
'style-6' => __( 'Style 6', 'thrive-cb' ),
'style-7' => __( 'Style 7', 'thrive-cb' ),
),
'default' => 'no_style',
),
),
'CustomAnswerInput' => [
'config' => [
'full-width' => true,
],
'extends' => 'LabelInput',
],
),
),
'typography' => [
'config' => [
'FontColor' => [
'css_suffix' => ' .tve-input-option-text',
'important' => true,
],
'TextAlign' => [
'css_suffix' => ' .tve-input-option-text',
'css_prefix' => $prefix_config,
'important' => true,
],
'FontSize' => [
'css_suffix' => ' .tve-input-option-text',
'important' => true,
],
'TextStyle' => [
'css_suffix' => ' .tve-input-option-text',
'css_prefix' => $prefix_config,
'important' => true,
],
'LineHeight' => [
'css_suffix' => ' .tve-input-option-text',
'important' => true,
],
'FontFace' => [
'css_suffix' => ' .tve-input-option-text',
'important' => true,
],
'LetterSpacing' => [
'css_suffix' => ' .tve-input-option-text',
'css_prefix' => $prefix_config,
'important' => true,
],
'TextTransform' => [
'css_suffix' => ' .tve-input-option-text',
'css_prefix' => $prefix_config,
'important' => true,
],
],
],
'layout' => [
'disabled_controls' => [
'margin',
'.tve-advanced-controls',
'Alignment',
'Display',
],
],
'animation' => [
'hidden' => true,
],
);
}
}

View File

@@ -0,0 +1,59 @@
<?php
/**
* Thrive Themes - https://thrivethemes.com
*
* @package TCB2.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Silence is golden
}
require_once __DIR__ . '/../class-tcb-lead-generation-element.php';
/**
* Class TCB_Lead_Generation_Element
*/
class TCB_Lead_Generation_Contact_Form_Element extends TCB_Lead_Generation_Element {
/**
* @return string
*/
public function name() {
return __( 'Contact Form', 'thrive-cb' );
}
/**
* HTML layout of the element for when it's dragged in the canvas
*
* @return string
*/
public function html_placeholder( $title = null ) {
if ( empty( $title ) ) {
$title = $this->name();
}
return tcb_template( 'elements/element-placeholder', array(
'icon' => $this->icon(),
'class' => 'tcb-ct-placeholder',
'title' => $title,
'extra_attr' => 'data-ct="' . $this->tag() . '-0" data-tcb-elem-type="' . $this->tag() . '" data-tcb-lg-type="contact_form" data-specific-modal="lead-generation"',
), true );
}
/**
* Get element alternate
*
* @return string
*/
public function alternate() {
return 'contact-form';
}
/**
* @return string
*/
public function icon() {
return 'contact_form';
}
}

View File

@@ -0,0 +1,258 @@
<?php
/**
* Thrive Themes - https://thrivethemes.com
*
* @package TCB2.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Silence is golden
}
class TCB_Lead_Generation_Country_Element extends TCB_Element_Abstract {
public function name() {
return __( 'Country Field', 'thrive-cb' );
}
public function identifier() {
return '.tve_lg_country';
}
public function hide() {
return true;
}
/**
* @return bool
*/
public function has_hover_state() {
return true;
}
/**
* @inheritDoc
*/
public function expanded_state_config() {
return true;
}
public function own_components() {
$dropdown_svg = $this->get_icon_styles();
$dropdown_icons = [];
foreach ( $dropdown_svg as $key => & $dropdown_icon ) {
$dropdown_icons[ $key ] = $dropdown_icon['label'];
unset( $dropdown_icon['label'] );
}
unset( $dropdown_icon );
$controls_default_config = array(
'css_suffix' => ' span',
'css_prefix' => tcb_selection_root() . ' ',
);
$components = array(
'lead_generation_country' => array(
'config' => array(
'DropdownPalettes' => array(
'config' => [],
'extends' => 'Palettes',
'important' => apply_filters( 'tcb_lg_color_inputs_important', true ),
),
'ShowLabel' => array(
'config' => array(
'label' => __( 'Show Label', 'thrive-cb' ),
),
'extends' => 'Switch',
),
'RowsWhenOpen' => array(
'config' => array(
'min' => 2,
'max' => 15,
'label' => __( 'Rows when open', 'thrive-cb' ),
'um' => [],
),
'extends' => 'Slider',
),
'Required' => array(
'config' => array(
'default' => false,
'label' => __( 'Required' ),
),
'extends' => 'Switch',
),
'Placeholder' => array(
'config' => array(
'label' => __( 'Include Placeholder', 'thrive-cb' ),
),
'extends' => 'Switch',
),
'PlaceholderInput' => [
'config' => [
'label' => 'Placeholder',
],
'extends' => 'LabelInput',
],
'OptionsList' => array(
'config' => array(
'sortable' => true,
'settings_icon' => 'pen-light',
'marked' => true,
'marking_text' => __( 'Set as default', 'thrive-cb' ),
'marking_icon' => 'check',
'marked_field' => 'default',
),
),
'StyleChange' => array(
'config' => array(
'label' => __( 'Dropdown Style', 'thrive-cb' ),
'preview' => [
'key' => '',
'label' => 'default',
],
),
),
'SelectStylePicker' => array(
'config' => array(
'label' => __( 'Choose dropdown style', 'thrive-cb' ),
'items' => array(
'default' => array(
'label' => __( 'Default', 'thrive-cb' ),
),
'style-1' => array(
'label' => __( 'Style 1', 'thrive-cb' ),
),
'style-2' => array(
'label' => __( 'Style 2', 'thrive-cb' ),
),
'style-3' => array(
'label' => __( 'Style 3', 'thrive-cb' ),
),
'style-4' => array(
'label' => __( 'Style 4', 'thrive-cb' ),
),
'style-5' => array(
'label' => __( 'Style 5', 'thrive-cb' ),
),
'style-6' => array(
'label' => __( 'Style 6', 'thrive-cb' ),
),
'style-7' => array(
'label' => __( 'Style 7', 'thrive-cb' ),
),
'style-8' => array(
'label' => __( 'Style 8', 'thrive-cb' ),
),
'style-9' => array(
'label' => __( 'Style 9', 'thrive-cb' ),
),
'style-10' => array(
'label' => __( 'Style 10', 'thrive-cb' ),
),
'style-11' => array(
'label' => __( 'Style 11', 'thrive-cb' ),
),
'style-12' => array(
'label' => __( 'Style 12', 'thrive-cb' ),
),
'style-13' => array(
'label' => __( 'Style 13', 'thrive-cb' ),
),
'style-14' => array(
'label' => __( 'Style 14', 'thrive-cb' ),
),
'style-15' => array(
'label' => __( 'Style 15', 'thrive-cb' ),
),
),
'default' => 'default',
),
),
'DropdownIcon' => array(
'config' => array(
'name' => __( 'Dropdown Icon', 'thrive-cb' ),
'options' => $dropdown_icons,
),
'paths' => $dropdown_svg,
),
'DropdownAnimation' => array(
'config' => array(
'name' => __( 'Dropdown Animation', 'thrive-cb' ),
'options' => array(
'' => __( 'None (instant)', 'thrive-cb' ),
'da-fade' => __( 'Fade In and Out ', 'thrive-cb' ),
'da-slide' => __( 'Slide Down', 'thrive-cb' ),
'da-fold' => __( 'Fold Out', 'thrive-cb' ),
),
),
'extends' => 'Select',
),
'AnswerTag' => array(
'config' => array(
'default' => false,
'label' => __( 'Send answer as tag', 'thrive-cb' ),
'info' => true,
),
'extends' => 'Switch',
),
),
),
'typography' => [
'disabled_controls' => [ 'TextAlign' ],
'config' => [
'FontSize' => $controls_default_config,
'FontColor' => $controls_default_config,
'FontFace' => $controls_default_config,
'LetterSpacing' => $controls_default_config,
'LineHeight' => $controls_default_config,
'TextAlign' => $controls_default_config,
'TextStyle' => $controls_default_config,
'TextTransform' => $controls_default_config,
],
],
'layout' => [
'disabled_controls' => [
'Width',
'Height',
'Alignment',
'.tve-advanced-controls',
],
],
'animation' => [
'hidden' => true,
],
'styles-templates' => [],
'responsive' => [
'hidden' => true,
],
);
return array_merge( $components, $this->group_component() );
}
public function get_icon_styles() {
return [
'style_1' => [
'label' => 'Angle',
'up' => '<path d="M151.5 347.8L3.5 201c-4.7-4.7-4.7-12.3 0-17l19.8-19.8c4.7-4.7 12.3-4.7 17 0L160 282.7l119.7-118.5c4.7-4.7 12.3-4.7 17 0l19.8 19.8c4.7 4.7 4.7 12.3 0 17l-148 146.8c-4.7 4.7-12.3 4.7-17 0z"/>',
'box' => '0 0 320 512',
],
'style_2' => [
'label' => 'Chevron',
'up' => '<path d="M443.5 162.6l-7.1-7.1c-4.7-4.7-12.3-4.7-17 0L224 351 28.5 155.5c-4.7-4.7-12.3-4.7-17 0l-7.1 7.1c-4.7 4.7-4.7 12.3 0 17l211 211.1c4.7 4.7 12.3 4.7 17 0l211-211.1c4.8-4.7 4.8-12.3.1-17z"/>',
'box' => '0 0 448 512',
],
'style_3' => [
'label' => 'Caret',
'up' => '<path d="M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z"/>',
'box' => '0 0 320 512',
],
'style_4' => [
'label' => 'Triangle',
'up' => '<path d="M272 160H48.1c-42.6 0-64.2 51.7-33.9 81.9l111.9 112c18.7 18.7 49.1 18.7 67.9 0l112-112c30-30.1 8.7-81.9-34-81.9zM160 320L48 208h224L160 320z"/>',
'box' => '0 0 320 512',
],
];
}
}

View File

@@ -0,0 +1,142 @@
<?php
/**
* Thrive Themes - https://thrivethemes.com
*
* @package TCB2.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Silence is golden
}
class TCB_Lead_Generation_Date_Time_Element extends TCB_Element_Abstract {
public function name() {
return __( 'Lead Generation Date/Time Input', 'thrive-cb' );
}
public function identifier() {
return '.tve_lg_date';
}
public function hide() {
return true;
}
public function own_components() {
$prefix_config = tcb_selection_root();
$controls_default_config = [
'css_suffix' => [ ' input'],
'css_prefix' => $prefix_config . ' ',
];
$controls_default_config_text = [
'css_suffix' => [ ' input', ' ::placeholder' ],
'css_prefix' => $prefix_config . ' ',
];
return array(
'lead_generation_input' => array(
'config' => array(
'placeholder' => array(
'config' => array(
'label' => __( 'Placeholder', 'thrive-cb' ),
),
),
'ShowLabel' => array(
'config' => array(
'name' => '',
'label' => __( 'Show Label', 'thrive-cb' ),
'default' => true,
),
'extends' => 'Switch',
),
'icon_side' => array(
'rem_ic_css_suf' => ' input', //Remove Icon Css Suffix
'css_suffix' => ' .thrv_icon',
'config' => array(
'name' => __( 'Icon Side', 'thrive-cb' ),
'buttons' => array(
array(
'value' => 'left',
'text' => __( 'Left', 'thrive-cb' ),
),
array(
'value' => 'right',
'text' => __( 'Right', 'thrive-cb' ),
),
),
),
),
'required' => array(
'config' => array(
'default' => false,
'label' => __( 'Required field' ),
),
'extends' => 'Switch',
),
),
),
'typography' => array(
'config' => array(
'FontSize' => $controls_default_config_text,
'FontColor' => array_merge( [ 'important' => true ], $controls_default_config_text ),
'FontFace' => $controls_default_config_text,
'LetterSpacing' => $controls_default_config_text,
'LineHeight' => $controls_default_config_text,
'TextAlign' => $controls_default_config_text,
'TextStyle' => $controls_default_config_text,
'TextTransform' => $controls_default_config_text,
),
),
'layout' => [
'disabled_controls' => [
'Width',
'Height',
'Alignment',
'.tve-advanced-controls',
'hr',
],
'config' => [
'MarginAndPadding' => [
'margin_suffix' => '',
'padding_suffix' => [ ' input', ' textarea' ],
'css_prefix' => $prefix_config . ' ',
],
],
],
'borders' => [
'config' => [
'Borders' => $controls_default_config,
'Corners' => $controls_default_config,
],
],
'animation' => [
'hidden' => true,
],
'background' => [
'config' => [
'ColorPicker' => $controls_default_config,
'PreviewList' => $controls_default_config,
],
],
'shadow' => array(
'config' => array_merge( $controls_default_config, [ 'default_shadow' => 'none' ] ),
),
'styles-templates' => [
'config' => [
'to' => 'input',
],
],
'responsive' => [
'hidden' => true,
],
);
}
/**
* @return bool
*/
public function has_hover_state() {
return true;
}
}

View File

@@ -0,0 +1,118 @@
<?php
/**
* Thrive Themes - https://thrivethemes.com
*
* @package thrive-visual-editor
*/
use TCB\inc\helpers\FileUploadConfig;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Silence is golden!
}
/**
* Class TCB_ContentBox_Element
*/
class TCB_Lead_Generation_File_Element extends TCB_ContentBox_Element {
/**
* Name of the element
*
* @return string
*/
public function name() {
return __( 'File Upload', 'thrive-cb' );
}
public function hide() {
return true;
}
/**
* Section element identifier
*
* @return string
*/
public function identifier() {
return '.thrv-content-box.tve_lg_file';
}
/**
* Component and control config
*
* @return array
*/
public function own_components() {
$parent = parent::own_components();
unset(
$parent['shared-styles'],
$parent['animation'],
$parent['responsive'],
$parent['contentbox'],
$parent['borders']['config']['Borders']['to'],
$parent['borders']['config']['Corners']['to'],
$parent['background']['config']['to'],
$parent['shadow']['config']['to']
);
$parent['borders']['config']['css_suffix'] = ' > .tve-content-box-background';
$parent['background']['config']['css_suffix'] = ' > .tve-content-box-background';
$parent['shadow']['config']['css_suffix'] = ' > .tve-content-box-background';
return $parent +
array(
'lead_generation_file' => array(
'order' => 0,
'options' => [
'default_config' => FileUploadConfig::$defaults,
],
'config' => array(
'required' => array(
'config' => array(
'default' => false,
'label' => __( 'Required field', 'thrive-cb' ),
),
'extends' => 'Switch',
),
'ShowLabel' => array(
'config' => array(
'name' => '',
'label' => __( 'Show label', 'thrive-cb' ),
'default' => false,
),
'extends' => 'Switch',
),
'file_types' => array(
'groups' => FileUploadConfig::get_allowed_file_groups(),
'extension_blacklist' => FileUploadConfig::get_extensions_blacklist(),
),
'maxFiles' => array(
'config' => array(
'name' => __( 'Max files', 'thrive-cb' ),
'min' => 1,
'max' => 5,
'size' => 'medium',
),
),
'maxSize' => array(
'config' => array(
'name' => __( 'Max file size', 'thrive-cb' ),
'maxlength' => 3,
'um' => [ 'MB' ],
'min' => 0,
'max' => wp_max_upload_size() / 1024 / 1024,
'size' => 'medium',
),
),
),
),
);
}
/**
* @return bool
*/
public function has_hover_state() {
return false;
}
}

View File

@@ -0,0 +1,183 @@
<?php
/**
* Thrive Themes - https://thrivethemes.com
*
* @package TCB2.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Silence is golden
}
class TCB_Lead_Generation_GDPR_Element extends TCB_Element_Abstract {
public function name() {
return __( 'Checkbox', 'thrive-cb' );
}
public function identifier() {
return '.tcb-lg-consent';
}
public function hide() {
return true;
}
/**
* @return bool
*/
public function has_hover_state() {
return true;
}
/**
* @inheritDoc
*/
public function expanded_state_config() {
return true;
}
/**
* @inheritDoc
*/
public function expanded_state_label() {
return __( 'Selected', 'thrive-cb' );
}
public function own_components() {
$prefix_config = tcb_selection_root() . ' ';
$components = array(
'lead_generation_gdpr' => array(
'config' => array(
'CheckboxPalettes' => array(
'to' => '.tve_lg_checkbox_wrapper',
'config' => [],
'extends' => 'Palettes',
'important' => apply_filters( 'tcb_lg_color_inputs_important', true ),
),
'ShowLabel' => array(
'config' => array(
'label' => __( 'Show Label', 'thrive-cb' ),
),
'extends' => 'Switch',
),
'CheckboxSize' => array(
'to' => '.tve_lg_checkbox_wrapper',
'css_suffix' => ' .tve-checkmark',
'config' => array(
'default' => '20',
'min' => '0',
'max' => '30',
'label' => __( 'Checkbox Size', 'thrive-cb' ),
'um' => [ 'px' ],
),
'extends' => 'Slider',
),
'StyleChange' => array(
'to' => '.tve_lg_checkbox_wrapper',
'config' => array(
'label' => __( 'Checkbox Style', 'thrive-cb' ),
'preview' => [
'key' => '',
'label' => 'default',
],
),
),
'CheckboxStylePicker' => array(
'to' => '.tve_lg_checkbox_wrapper',
'config' => array(
'label' => __( 'Choose checkbox style', 'thrive-cb' ),
'items' => array(
'default' => __( 'Default', 'thrive-cb' ),
'style-1' => __( 'Style 1', 'thrive-cb' ),
'style-2' => __( 'Style 2', 'thrive-cb' ),
'style-3' => __( 'Style 3', 'thrive-cb' ),
'style-4' => __( 'Style 4', 'thrive-cb' ),
'style-5' => __( 'Style 5', 'thrive-cb' ),
'style-6' => __( 'Style 6', 'thrive-cb' ),
'style-7' => __( 'Style 7', 'thrive-cb' ),
),
'default' => 'no_style',
),
),
),
),
'typography' => [
'config' => [
'to' => '.tve_lg_checkbox_wrapper',
'FontColor' => [
'css_suffix' => ' .tve-input-option-text',
'important' => true,
],
'TextAlign' => [
'css_suffix' => ' .tve-input-option-text',
'css_prefix' => $prefix_config,
'important' => true,
],
'FontSize' => [
'css_suffix' => ' .tve-input-option-text',
'important' => true,
],
'TextStyle' => [
'css_suffix' => ' .tve-input-option-text',
'css_prefix' => $prefix_config,
'important' => true,
],
'LineHeight' => [
'css_suffix' => ' .tve-input-option-text',
'important' => true,
],
'FontFace' => [
'css_suffix' => ' .tve-input-option-text',
'important' => true,
],
'LetterSpacing' => [
'css_suffix' => ' .tve-input-option-text',
'css_prefix' => $prefix_config,
'important' => true,
],
'TextTransform' => [
'css_suffix' => ' .tve-input-option-text',
'css_prefix' => $prefix_config,
'important' => true,
],
],
],
'layout' => [
'disabled_controls' => [
'Width',
'Height',
'Alignment',
'.tve-advanced-controls',
'hr',
],
],
'borders' => [
'config' => [
'to' => '.tve_lg_checkbox_wrapper',
],
],
'animation' => [
'hidden' => true,
],
'background' => [
'config' => [
'to' => '.tve_lg_checkbox_wrapper',
],
],
'shadow' => [
'hidden' => true,
],
'styles-templates' => [
'config' => [],
],
'responsive' => [
'hidden' => true,
],
);
return array_merge( $components, $this->group_component() );
}
}

View File

@@ -0,0 +1,142 @@
<?php
/**
* Thrive Themes - https://thrivethemes.com
*
* @package TCB2.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Silence is golden
}
class TCB_Lead_Generation_Input_Element extends TCB_Element_Abstract {
public function name() {
return __( 'Lead Generation Input', 'thrive-cb' );
}
public function identifier() {
return '.tve_lg_input';
}
public function hide() {
return true;
}
public function own_components() {
$prefix_config = tcb_selection_root();
$controls_default_config = [
'css_suffix' => [ ' input', ' textarea' ],
'css_prefix' => $prefix_config . ' ',
];
$controls_default_config_text = [
'css_suffix' => [ ' input', ' textarea', ' ::placeholder' ],
'css_prefix' => $prefix_config . ' ',
];
return array(
'lead_generation_input' => array(
'config' => array(
'placeholder' => array(
'config' => array(
'label' => __( 'Placeholder', 'thrive-cb' ),
),
),
'ShowLabel' => array(
'config' => array(
'name' => '',
'label' => __( 'Show Label', 'thrive-cb' ),
'default' => true,
),
'extends' => 'Switch',
),
'icon_side' => array(
'rem_ic_css_suf' => ' input', //Remove Icon Css Suffix
'css_suffix' => ' .thrv_icon',
'config' => array(
'name' => __( 'Icon Side', 'thrive-cb' ),
'buttons' => array(
array(
'value' => 'left',
'text' => __( 'Left', 'thrive-cb' ),
),
array(
'value' => 'right',
'text' => __( 'Right', 'thrive-cb' ),
),
),
),
),
'required' => array(
'config' => array(
'default' => false,
'label' => __( 'Required field' ),
),
'extends' => 'Switch',
),
),
),
'typography' => array(
'config' => array(
'FontSize' => $controls_default_config_text,
'FontColor' => array_merge( [ 'important' => true ], $controls_default_config_text ),
'FontFace' => $controls_default_config_text,
'LetterSpacing' => $controls_default_config_text,
'LineHeight' => $controls_default_config_text,
'TextAlign' => $controls_default_config_text,
'TextStyle' => $controls_default_config_text,
'TextTransform' => $controls_default_config_text,
),
),
'layout' => [
'disabled_controls' => [
'Width',
'Height',
'Alignment',
'.tve-advanced-controls',
'hr',
],
'config' => [
'MarginAndPadding' => [
'margin_suffix' => '',
'padding_suffix' => [ ' input', ' textarea' ],
'css_prefix' => $prefix_config . ' ',
],
],
],
'borders' => [
'config' => [
'Borders' => $controls_default_config,
'Corners' => $controls_default_config,
],
],
'animation' => [
'hidden' => true,
],
'background' => [
'config' => [
'ColorPicker' => $controls_default_config,
'PreviewList' => $controls_default_config,
],
],
'shadow' => array(
'config' => array_merge( $controls_default_config, [ 'default_shadow' => 'none' ] ),
),
'styles-templates' => [
'config' => [
'to' => 'input',
],
],
'responsive' => [
'hidden' => true,
],
);
}
/**
* @return bool
*/
public function has_hover_state() {
return true;
}
}

View File

@@ -0,0 +1,142 @@
<?php
/**
* Thrive Themes - https://thrivethemes.com
*
* @package TCB2.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Silence is golden
}
class TCB_Lead_Generation_Number_Element extends TCB_Element_Abstract {
public function name() {
return __( 'Lead Generation Number Input', 'thrive-cb' );
}
public function identifier() {
return '.tve_lg_number';
}
public function hide() {
return true;
}
public function own_components() {
$prefix_config = tcb_selection_root();
$controls_default_config = [
'css_suffix' => [ ' input', ' textarea' ],
'css_prefix' => $prefix_config . ' ',
];
$controls_default_config_text = [
'css_suffix' => [ ' input', ' textarea', ' ::placeholder' ],
'css_prefix' => $prefix_config . ' ',
];
return array(
'lead_generation_number' => array(
'config' => array(
'placeholder' => array(
'config' => array(
'label' => __( 'Placeholder', 'thrive-cb' ),
),
),
'ShowLabel' => array(
'config' => array(
'name' => '',
'label' => __( 'Show Label', 'thrive-cb' ),
'default' => true,
),
'extends' => 'Switch',
),
'icon_side' => array(
'rem_ic_css_suf' => ' input', //Remove Icon Css Suffix
'css_suffix' => ' .thrv_icon',
'config' => array(
'name' => __( 'Icon Side', 'thrive-cb' ),
'buttons' => array(
array(
'value' => 'left',
'text' => __( 'Left', 'thrive-cb' ),
),
array(
'value' => 'right',
'text' => __( 'Right', 'thrive-cb' ),
),
),
),
),
'required' => array(
'config' => array(
'default' => false,
'label' => __( 'Required field' ),
),
'extends' => 'Switch',
),
),
),
'typography' => array(
'config' => array(
'FontSize' => $controls_default_config_text,
'FontColor' => array_merge( [ 'important' => true ], $controls_default_config_text ),
'FontFace' => $controls_default_config_text,
'LetterSpacing' => $controls_default_config_text,
'LineHeight' => $controls_default_config_text,
'TextAlign' => $controls_default_config_text,
'TextStyle' => $controls_default_config_text,
'TextTransform' => $controls_default_config_text,
),
),
'layout' => [
'disabled_controls' => [
'Width',
'Height',
'Alignment',
'.tve-advanced-controls',
'hr',
],
'config' => [
'MarginAndPadding' => [
'margin_suffix' => '',
'padding_suffix' => [ ' input', ' textarea' ],
'css_prefix' => $prefix_config . ' ',
],
],
],
'borders' => [
'config' => [
'Borders' => $controls_default_config,
'Corners' => $controls_default_config,
],
],
'animation' => [
'hidden' => true,
],
'background' => [
'config' => [
'ColorPicker' => $controls_default_config,
'PreviewList' => $controls_default_config,
],
],
'shadow' => array(
'config' => array_merge( $controls_default_config, [ 'default_shadow' => 'none' ] ),
),
'styles-templates' => [
'config' => [
'to' => 'input',
],
],
'responsive' => [
'hidden' => true,
],
);
}
/**
* @return bool
*/
public function has_hover_state() {
return true;
}
}

View File

@@ -0,0 +1,136 @@
<?php
/**
* Thrive Themes - https://thrivethemes.com
*
* @package TCB2.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Silence is golden
}
class TCB_Lead_Generation_Radio_Element extends TCB_Element_Abstract {
public function name() {
return __( 'Radio Field', 'thrive-cb' );
}
public function identifier() {
return '.tve_lg_radio';
}
public function hide() {
return true;
}
public function own_components() {
$components = array(
'lead_generation_radio' => array(
'config' => array(
'ShowLabel' => array(
'config' => array(
'label' => __( 'Show Label', 'thrive-cb' ),
),
'extends' => 'Switch',
),
'Required' => array(
'config' => array(
'default' => false,
'label' => __( 'Required field' ),
),
'extends' => 'Switch',
),
'ColumnNumber' => array(
'to' => '.tve-radio-grid',
'config' => array(
'default' => '1',
'min' => '1',
'max' => '5',
'limit' => '5',
'label' => __( 'Columns', 'thrive-cb' ),
'um' => [],
),
'extends' => 'Slider',
),
'VerticalSpace' => array(
'to' => '.tve-radio-grid',
'config' => array(
'default' => '0',
'min' => '0',
'max' => '300',
'label' => __( 'Vertical Space', 'thrive-cb' ),
'um' => [ 'px', '%' ],
'css' => '--v-gutter',
),
'extends' => 'Slider',
),
'HorizontalSpace' => array(
'to' => '.tve-radio-grid',
'config' => array(
'default' => '20',
'min' => '0',
'max' => '100',
'label' => __( 'Horizontal Space', 'thrive-cb' ),
'um' => [ 'px', '%' ],
'css' => '--h-gutter',
),
'extends' => 'Slider',
),
'OptionsList' => array(
'config' => array(
'sortable' => true,
'settings_icon' => 'pen-light',
'marked' => true,
'marking_text' => __( 'Set as default', 'thrive-cb' ),
'marking_icon' => 'check',
'marked_field' => 'default',
),
),
'AnswerTag' => array(
'config' => array(
'default' => false,
'label' => __( 'Send answer as tag', 'thrive-cb' ),
'info' => true,
),
'extends' => 'Switch',
),
),
),
'typography' => [
'hidden' => true,
],
'layout' => [
'disabled_controls' => [
'Width',
'Height',
'Alignment',
'.tve-advanced-controls',
'hr',
],
'config' => [],
],
'borders' => [
'config' => [],
],
'animation' => [
'hidden' => true,
],
'background' => [
'config' => [],
],
'shadow' => [
'hidden' => true,
],
'styles-templates' => [
'config' => [],
],
'responsive' => [
'hidden' => true,
],
);
return array_merge( $components, $this->group_component() );
}
}

View File

@@ -0,0 +1,179 @@
<?php
/**
* Thrive Themes - https://thrivethemes.com
*
* @package TCB2.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Silence is golden
}
class TCB_Lead_Generation_Radio_Option_Element extends TCB_Element_Abstract {
public function name() {
return __( 'Radio Option', 'thrive-cb' );
}
public function identifier() {
return '.tve_lg_radio_wrapper';
}
public function hide() {
return true;
}
/**
* @return bool
*/
public function has_hover_state() {
return true;
}
/**
* @inheritDoc
*/
public function expanded_state_config() {
return true;
}
/**
* @inheritDoc
*/
public function expanded_state_label() {
return __( 'Selected', 'thrive-cb' );
}
public function own_components() {
$prefix_config = tcb_selection_root() . ' ';
return array(
'lead_generation_radio_option' => array(
'config' => array(
'RadioPalettes' => array(
'config' => [],
'extends' => 'Palettes',
'important' => apply_filters( 'tcb_lg_color_inputs_important', true ),
),
'LabelAsValue' => array(
'config' => array(
'name' => '',
'label' => __( 'Use label as value', 'thrive-cb' ),
'default' => true,
'info' => true,
),
'extends' => 'Switch',
),
'InputValue' => array(
'config' => array(
'label' => __( 'Value', 'thrive-cb' ),
),
'extends' => 'LabelInput',
),
'SetAsDefault' => array(
'config' => array(
'name' => '',
'label' => __( 'Set as default', 'thrive-cb' ),
'default' => false,
),
'extends' => 'Switch',
),
'RadioSize' => array(
'css_suffix' => ' .tve-checkmark',
'config' => array(
'default' => '20',
'min' => '0',
'max' => '30',
'label' => __( 'Radio Size', 'thrive-cb' ),
'um' => [ 'px' ],
),
'extends' => 'Slider',
),
'StyleChange' => array(
'config' => array(
'label' => __( 'Radio Style', 'thrive-cb' ),
'preview' => [
'key' => '',
'label' => 'default',
],
),
),
'RadioStylePicker' => array(
'config' => array(
'label' => __( 'Choose radio style', 'thrive-cb' ),
'items' => array(
'default' => __( 'Default', 'thrive-cb' ),
'style-1' => __( 'Style 1', 'thrive-cb' ),
'style-2' => __( 'Style 2', 'thrive-cb' ),
'style-3' => __( 'Style 3', 'thrive-cb' ),
'gradient-1' => __( 'Gradient 1', 'thrive-cb' ),
'gradient-2' => __( 'Gradient 2', 'thrive-cb' ),
'gradient-3' => __( 'Gradient 3', 'thrive-cb' ),
'gradient-4' => __( 'Gradient 4', 'thrive-cb' ),
),
'default' => 'no_style',
),
),
'CustomAnswerInput' => [
'config' => [
'full-width' => true,
],
'extends' => 'LabelInput',
],
),
),
'typography' => [
'config' => [
'FontColor' => [
'css_suffix' => ' .tve-input-option-text',
'important' => true,
],
'TextAlign' => [
'css_suffix' => ' .tve-input-option-text',
'css_prefix' => $prefix_config,
'important' => true,
],
'FontSize' => [
'css_suffix' => ' .tve-input-option-text',
'important' => true,
],
'TextStyle' => [
'css_suffix' => ' .tve-input-option-text',
'css_prefix' => $prefix_config,
'important' => true,
],
'LineHeight' => [
'css_suffix' => ' .tve-input-option-text',
'important' => true,
],
'FontFace' => [
'css_suffix' => ' .tve-input-option-text',
'important' => true,
],
'LetterSpacing' => [
'css_suffix' => ' .tve-input-option-text',
'css_prefix' => $prefix_config,
'important' => true,
],
'TextTransform' => [
'css_suffix' => ' .tve-input-option-text',
'css_prefix' => $prefix_config,
'important' => true,
],
],
],
'layout' => [
'disabled_controls' => [
'margin',
'.tve-advanced-controls',
'Alignment',
'Display',
],
],
'animation' => [
'hidden' => true,
],
);
}
}

View File

@@ -0,0 +1,181 @@
<?php
/**
* Thrive Themes - https://thrivethemes.com
*
* @package TCB2.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Silence is golden
}
class TCB_Lead_Generation_Recaptcha_Element extends TCB_Element_Abstract {
public function name() {
return __( 'Form Spam Prevention Tool', 'thrive-cb' );
}
public function identifier() {
return '.tve-sp-tool-container';
}
public function hide() {
return true;
}
public function own_components() {
$components = array(
'lead_generation_recaptcha' => array(
'config' => array(
'CaptchaTheme' => array(
'config' => array(
'name' => __( 'Theme', 'thrive-cb' ),
'options' => array(
array(
'value' => 'light',
'name' => __( 'Light', 'thrive-cb' ),
),
array(
'value' => 'dark',
'name' => __( 'Dark', 'thrive-cb' ),
),
),
),
'extends' => 'Select',
),
'CaptchaLanguage' => array(
'config' => array(
'name' => __( 'Language', 'thrive-cb' ),
'options' => $this->supportedLanguages(),
),
'extends' => 'Select',
),
'CaptchaAppearance' => array(
'config' => array(
'name' => __( 'Appearance mode', 'thrive-cb' ),
'options' => array(
'always' => 'Always',
'interaction-only' => 'Interaction Only',
),
),
'extends' => 'Select',
),
'CaptchaType' => array(
'config' => array(
'name' => __( 'Type', 'thrive-cb' ),
'options' => array(
array(
'value' => 'image',
'name' => __( 'Image', 'thrive-cb' ),
),
array(
'value' => 'audio',
'name' => __( 'Audio', 'thrive-cb' ),
),
),
),
'extends' => 'Select',
),
'CaptchaSize' => array(
'config' => array(
'name' => __( 'Size', 'thrive-cb' ),
'options' => array(
array(
'value' => 'normal',
'name' => __( 'Normal', 'thrive-cb' ),
),
array(
'value' => 'compact',
'name' => __( 'Compact', 'thrive-cb' ),
),
),
),
'extends' => 'Select',
),
),
),
'layout' => [
'disabled_controls' => [
'Width',
'Height',
'padding',
'Display',
'.tve-advanced-controls',
],
'config' => [
'Alignment' => [
'important' => true,
],
],
],
'animation' => [
'hidden' => true,
],
'background' => [
'hidden' => true,
],
'responsive' => [
'hidden' => true,
],
'styles-templates' => [ 'hidden' => true ],
'typography' => [ 'hidden' => true ],
);
return $components;
}
public function supportedLanguages() {
$languages = array(
"auto" => __( "Auto", 'thrive-cb' ),
"en" => __( "English (United States)", 'thrive-cb' ),
"ar" => __( "Arabic (Egypt)", 'thrive-cb' ),
"bg" => __( "Bulgarian (Bulgaria)", 'thrive-cb' ),
"cs" => __( "Czech (Czech Republic)", 'thrive-cb' ),
"da" => __( "Danish (Denmark)", 'thrive-cb' ),
"de" => __( "German (Germany)", 'thrive-cb' ),
"el" => __( "Greek (Greece)", 'thrive-cb' ),
"es" => __( "Spanish (Spain)", 'thrive-cb' ),
"fa" => __( "Farsi (Iran)", 'thrive-cb' ),
"fi" => __( "Finnish (Finland)", 'thrive-cb' ),
"fr" => __( "French (France)", 'thrive-cb' ),
"he" => __( "Hebrew (Israel)", 'thrive-cb' ),
"hi" => __( "Hindi (India)", 'thrive-cb' ),
"hr" => __( "Croatian (Croatia)", 'thrive-cb' ),
"hu" => __( "Hungarian (Hungary)", 'thrive-cb' ),
"id" => __( "Indonesian (Indonesia)", 'thrive-cb' ),
"it" => __( "Italian (Italy)", 'thrive-cb' ),
"ja" => __( "Japanese (Japan)", 'thrive-cb' ),
"ko" => __( "Korean (Korea)", 'thrive-cb' ),
"lt" => __( "Lithuanian (Lithuania)", 'thrive-cb' ),
"ms" => __( "Malay (Malaysia)", 'thrive-cb' ),
"nb" => __( "Norwegian Bokmål (Norway)", 'thrive-cb' ),
"nl" => __( "Dutch (Netherlands)", 'thrive-cb' ),
"pl" => __( "Polish (Poland)", 'thrive-cb' ),
"pt" => __( "Portuguese (Brazil)", 'thrive-cb' ),
"ro" => __( "Romanian (Romania)", 'thrive-cb' ),
"ru" => __( "Russian (Russia)", 'thrive-cb' ),
"sk" => __( "Slovak (Slovakia)", 'thrive-cb' ),
"sl" => __( "Slovenian (Slovenia)", 'thrive-cb' ),
"sr" => __( "Serbian (Serbia)", 'thrive-cb' ),
"sv" => __( "Swedish (Sweden)", 'thrive-cb' ),
"th" => __( "Thai (Thailand)", 'thrive-cb' ),
"tlh" => __( "Klingon (QonoS)", 'thrive-cb' ),
"tr" => __( "Turkish (Turkey)", 'thrive-cb' ),
"uk" => __( "Ukrainian (Ukraine)", 'thrive-cb' ),
"vi" => __( "Vietnamese (Vietnam)", 'thrive-cb' ),
"zh-cn" => __( "Chinese (Simplified, China)", 'thrive-cb' ),
"zh-tw" => __( "Chinese (Traditional, Taiwan)", 'thrive-cb' ),
);
$result = array();
foreach ( $languages as $code => $name ) {
$result[ $code ] = array(
"value" => $code,
"name" => $name,
);
}
return $result;
}
}

View File

@@ -0,0 +1,88 @@
<?php
/**
* Thrive Themes - https://thrivethemes.com
*
* @package thrive-visual-editor
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Silence is golden!
}
/**
* Class TCB_Menu_Child_Element
*/
class TCB_Lead_Generation_Select_Dropdown_Element extends TCB_Element_Abstract {
/**
* Name of the element
*
* @return string
*/
public function name() {
return __( 'Option Container', 'thrive-cb' );
}
/**
* Section element identifier
*
* @return string
*/
public function identifier() {
return '.tve-lg-dropdown-list';
}
/**
* Hidden element
*
* @return string
*/
public function hide() {
return true;
}
/**
* Component and control config
*
* @return array
*/
public function own_components() {
return array(
'borders' => array(
'blocked_controls' => array(
'Corners' => __( 'This is disabled for the current element because it can have an unpredictable behaviour', 'thrive-cb' ),
),
'config' => [
'Borders' => [
'important' => true,
],
'Corners' => [
'important' => true,
],
],
),
'shadow' => [
'config' => [
'important' => true,
'default_shadow' => 'none',
],
],
'layout' => [
'disabled_controls' => [
'margin',
'.tve-advanced-controls',
'Height',
'Width',
'Alignment',
'Display',
],
],
'typography' => [ 'hidden' => true ],
'animation' => [ 'hidden' => true ],
'responsive' => [ 'hidden' => true ],
'styles-templates' => [ 'hidden' => true ],
);
}
}

View File

@@ -0,0 +1,266 @@
<?php
/**
* Thrive Themes - https://thrivethemes.com
*
* @package TCB2.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Silence is golden
}
class TCB_Lead_Generation_Select_Element extends TCB_Element_Abstract {
public function name() {
return __( 'Dropdown Field', 'thrive-cb' );
}
public function identifier() {
return '.tve_lg_dropdown';
}
public function hide() {
return true;
}
/**
* @return bool
*/
public function has_hover_state() {
return true;
}
/**
* @inheritDoc
*/
public function expanded_state_config() {
return true;
}
public function own_components() {
$dropdown_svg = $this->get_icon_styles();
$dropdown_icons = [];
foreach ( $dropdown_svg as $key => & $dropdown_icon ) {
$dropdown_icons[ $key ] = $dropdown_icon['label'];
unset( $dropdown_icon['label'] );
}
unset( $dropdown_icon );
$controls_default_config = array(
'css_suffix' => ' span',
'css_prefix' => tcb_selection_root() . ' ',
);
$components = array(
'lead_generation_select' => array(
'config' => array(
'DropdownPalettes' => array(
'config' => [],
'extends' => 'Palettes',
'important' => apply_filters( 'tcb_lg_color_inputs_important', true ),
),
'ShowLabel' => array(
'config' => array(
'label' => __( 'Show Label', 'thrive-cb' ),
),
'extends' => 'Switch',
),
'RowsWhenOpen' => array(
'config' => array(
'min' => 2,
'max' => 15,
'label' => __( 'Rows when open', 'thrive-cb' ),
'um' => [],
),
'extends' => 'Slider',
),
'Required' => array(
'config' => array(
'default' => false,
'label' => __( 'Required' ),
),
'extends' => 'Switch',
),
'Placeholder' => array(
'config' => array(
'label' => __( 'Include Placeholder', 'thrive-cb' ),
),
'extends' => 'Switch',
),
'PlaceholderInput' => [
'config' => [
'label' => 'Placeholder',
],
'extends' => 'LabelInput',
],
'OptionsList' => array(
'config' => array(
'sortable' => true,
'settings_icon' => 'pen-light',
'marked' => true,
'marking_text' => __( 'Set as default', 'thrive-cb' ),
'marking_icon' => 'check',
'marked_field' => 'default',
),
),
'StyleChange' => array(
'config' => array(
'label' => __( 'Dropdown Style', 'thrive-cb' ),
'preview' => [
'key' => '',
'label' => 'default',
],
),
),
'SelectStylePicker' => array(
'config' => array(
'label' => __( 'Choose dropdown style', 'thrive-cb' ),
'items' => array(
'default' => array(
'label' => __( 'Default', 'thrive-cb' ),
),
'style-1' => array(
'label' => __( 'Style 1', 'thrive-cb' ),
),
'style-2' => array(
'label' => __( 'Style 2', 'thrive-cb' ),
),
'style-3' => array(
'label' => __( 'Style 3', 'thrive-cb' ),
),
'style-4' => array(
'label' => __( 'Style 4', 'thrive-cb' ),
),
'style-5' => array(
'label' => __( 'Style 5', 'thrive-cb' ),
),
'style-6' => array(
'label' => __( 'Style 6', 'thrive-cb' ),
),
'style-7' => array(
'label' => __( 'Style 7', 'thrive-cb' ),
),
'style-8' => array(
'label' => __( 'Style 8', 'thrive-cb' ),
),
'style-9' => array(
'label' => __( 'Style 9', 'thrive-cb' ),
),
'style-10' => array(
'label' => __( 'Style 10', 'thrive-cb' ),
),
'style-11' => array(
'label' => __( 'Style 11', 'thrive-cb' ),
),
'style-12' => array(
'label' => __( 'Style 12', 'thrive-cb' ),
),
'style-13' => array(
'label' => __( 'Style 13', 'thrive-cb' ),
),
'style-14' => array(
'label' => __( 'Style 14', 'thrive-cb' ),
),
'style-15' => array(
'label' => __( 'Style 15', 'thrive-cb' ),
),
),
'default' => 'default',
),
),
'DropdownIcon' => array(
'config' => array(
'name' => __( 'Dropdown Icon', 'thrive-cb' ),
'options' => $dropdown_icons,
),
'paths' => $dropdown_svg,
),
'DropdownAnimation' => array(
'config' => array(
'name' => __( 'Dropdown Animation', 'thrive-cb' ),
'options' => array(
'' => __( 'None (instant)', 'thrive-cb' ),
'da-fade' => __( 'Fade In and Out ', 'thrive-cb' ),
'da-slide' => __( 'Slide Down', 'thrive-cb' ),
'da-fold' => __( 'Fold Out', 'thrive-cb' ),
),
),
'extends' => 'Select',
),
'AnswerTag' => array(
'config' => array(
'default' => false,
'label' => __( 'Send answer as tag', 'thrive-cb' ),
'info' => true,
),
'extends' => 'Switch',
),
'MultipleOptions' => array(
'config' => array(
'label' => __( 'Dropdown list values', 'thrive-cb' ),
'keyup_listener' => true,
'info' => true,
),
'extends' => 'Textarea',
),
),
),
'typography' => [
'disabled_controls' => [ 'TextAlign' ],
'config' => [
'FontSize' => $controls_default_config,
'FontColor' => $controls_default_config,
'FontFace' => $controls_default_config,
'LetterSpacing' => $controls_default_config,
'LineHeight' => $controls_default_config,
'TextAlign' => $controls_default_config,
'TextStyle' => $controls_default_config,
'TextTransform' => $controls_default_config,
],
],
'layout' => [
'disabled_controls' => [
'Width',
'Height',
'Alignment',
'.tve-advanced-controls',
],
],
'animation' => [
'hidden' => true,
],
'styles-templates' => [],
'responsive' => [
'hidden' => true,
],
);
return array_merge( $components, $this->group_component() );
}
public function get_icon_styles() {
return [
'style_1' => [
'label' => 'Angle',
'up' => '<path d="M151.5 347.8L3.5 201c-4.7-4.7-4.7-12.3 0-17l19.8-19.8c4.7-4.7 12.3-4.7 17 0L160 282.7l119.7-118.5c4.7-4.7 12.3-4.7 17 0l19.8 19.8c4.7 4.7 4.7 12.3 0 17l-148 146.8c-4.7 4.7-12.3 4.7-17 0z"/>',
'box' => '0 0 320 512',
],
'style_2' => [
'label' => 'Chevron',
'up' => '<path d="M443.5 162.6l-7.1-7.1c-4.7-4.7-12.3-4.7-17 0L224 351 28.5 155.5c-4.7-4.7-12.3-4.7-17 0l-7.1 7.1c-4.7 4.7-4.7 12.3 0 17l211 211.1c4.7 4.7 12.3 4.7 17 0l211-211.1c4.8-4.7 4.8-12.3.1-17z"/>',
'box' => '0 0 448 512',
],
'style_3' => [
'label' => 'Caret',
'up' => '<path d="M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z"/>',
'box' => '0 0 320 512',
],
'style_4' => [
'label' => 'Triangle',
'up' => '<path d="M272 160H48.1c-42.6 0-64.2 51.7-33.9 81.9l111.9 112c18.7 18.7 49.1 18.7 67.9 0l112-112c30-30.1 8.7-81.9-34-81.9zM160 320L48 208h224L160 320z"/>',
'box' => '0 0 320 512',
],
];
}
}

View File

@@ -0,0 +1,131 @@
<?php
/**
* Thrive Themes - https://thrivethemes.com
*
* @package TCB2.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Silence is golden
}
class TCB_Lead_Generation_Select_Option_Element extends TCB_Element_Abstract {
public function name() {
return __( 'Dropdown Field Option', 'thrive-cb' );
}
public function identifier() {
return '.tve-lg-dropdown-option';
}
public function hide() {
return true;
}
/**
* @return bool
*/
public function has_hover_state() {
return true;
}
/**
* @inheritDoc
*/
public function active_state_config() {
return true;
}
public function own_components() {
$prefix_config = tcb_selection_root() . ' ';
return array(
'lead_generation_select_option' => array(
'config' => array(
'LabelAsValue' => array(
'config' => array(
'name' => '',
'label' => __( 'Use label as value', 'thrive-cb' ),
'default' => true,
'info' => true,
),
'extends' => 'Switch',
),
'InputValue' => array(
'config' => array(
'label' => __( 'Value', 'thrive-cb' ),
),
'extends' => 'LabelInput',
),
'SetAsDefault' => array(
'config' => array(
'name' => '',
'label' => __( 'Set as default', 'thrive-cb' ),
'default' => false,
),
'extends' => 'Switch',
),
'CustomAnswerInput' => [
'config' => [
'full-width' => true,
],
'extends' => 'LabelInput',
],
),
),
'typography' => [
'config' => [
'FontColor' => [
'css_suffix' => ' .tve-input-option-text',
'important' => true,
],
'TextAlign' => [
'css_suffix' => ' .tve-input-option-text',
'css_prefix' => $prefix_config,
'important' => true,
],
'FontSize' => [
'css_suffix' => ' .tve-input-option-text',
'important' => true,
],
'TextStyle' => [
'css_suffix' => ' .tve-input-option-text',
'css_prefix' => $prefix_config,
'important' => true,
],
'LineHeight' => [
'css_suffix' => ' .tve-input-option-text',
'important' => true,
],
'FontFace' => [
'css_suffix' => ' .tve-input-option-text',
'important' => true,
],
'LetterSpacing' => [
'css_suffix' => ' .tve-input-option-text',
'css_prefix' => $prefix_config,
'important' => true,
],
'TextTransform' => [
'css_suffix' => ' .tve-input-option-text',
'css_prefix' => $prefix_config,
'important' => true,
],
],
],
'layout' => [
'disabled_controls' => [
'margin',
'.tve-advanced-controls',
'Alignment',
'Display',
],
],
'animation' => [
'hidden' => true,
],
);
}
}

View File

@@ -0,0 +1,258 @@
<?php
/**
* Thrive Themes - https://thrivethemes.com
*
* @package TCB2.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Silence is golden
}
class TCB_Lead_Generation_State_Element extends TCB_Element_Abstract {
public function name() {
return __( 'State Field', 'thrive-cb' );
}
public function identifier() {
return '.tve_lg_state';
}
public function hide() {
return true;
}
/**
* @return bool
*/
public function has_hover_state() {
return true;
}
/**
* @inheritDoc
*/
public function expanded_state_config() {
return true;
}
public function own_components() {
$dropdown_svg = $this->get_icon_styles();
$dropdown_icons = [];
foreach ( $dropdown_svg as $key => & $dropdown_icon ) {
$dropdown_icons[ $key ] = $dropdown_icon['label'];
unset( $dropdown_icon['label'] );
}
unset( $dropdown_icon );
$controls_default_config = array(
'css_suffix' => ' span',
'css_prefix' => tcb_selection_root() . ' ',
);
$components = array(
'lead_generation_state' => array(
'config' => array(
'DropdownPalettes' => array(
'config' => [],
'extends' => 'Palettes',
'important' => apply_filters( 'tcb_lg_color_inputs_important', true ),
),
'ShowLabel' => array(
'config' => array(
'label' => __( 'Show Label', 'thrive-cb' ),
),
'extends' => 'Switch',
),
'RowsWhenOpen' => array(
'config' => array(
'min' => 2,
'max' => 15,
'label' => __( 'Rows when open', 'thrive-cb' ),
'um' => [],
),
'extends' => 'Slider',
),
'Required' => array(
'config' => array(
'default' => false,
'label' => __( 'Required' ),
),
'extends' => 'Switch',
),
'Placeholder' => array(
'config' => array(
'label' => __( 'Include Placeholder', 'thrive-cb' ),
),
'extends' => 'Switch',
),
'PlaceholderInput' => [
'config' => [
'label' => 'Placeholder',
],
'extends' => 'LabelInput',
],
'OptionsList' => array(
'config' => array(
'sortable' => true,
'settings_icon' => 'pen-light',
'marked' => true,
'marking_text' => __( 'Set as default', 'thrive-cb' ),
'marking_icon' => 'check',
'marked_field' => 'default',
),
),
'StyleChange' => array(
'config' => array(
'label' => __( 'Dropdown Style', 'thrive-cb' ),
'preview' => [
'key' => '',
'label' => 'default',
],
),
),
'SelectStylePicker' => array(
'config' => array(
'label' => __( 'Choose dropdown style', 'thrive-cb' ),
'items' => array(
'default' => array(
'label' => __( 'Default', 'thrive-cb' ),
),
'style-1' => array(
'label' => __( 'Style 1', 'thrive-cb' ),
),
'style-2' => array(
'label' => __( 'Style 2', 'thrive-cb' ),
),
'style-3' => array(
'label' => __( 'Style 3', 'thrive-cb' ),
),
'style-4' => array(
'label' => __( 'Style 4', 'thrive-cb' ),
),
'style-5' => array(
'label' => __( 'Style 5', 'thrive-cb' ),
),
'style-6' => array(
'label' => __( 'Style 6', 'thrive-cb' ),
),
'style-7' => array(
'label' => __( 'Style 7', 'thrive-cb' ),
),
'style-8' => array(
'label' => __( 'Style 8', 'thrive-cb' ),
),
'style-9' => array(
'label' => __( 'Style 9', 'thrive-cb' ),
),
'style-10' => array(
'label' => __( 'Style 10', 'thrive-cb' ),
),
'style-11' => array(
'label' => __( 'Style 11', 'thrive-cb' ),
),
'style-12' => array(
'label' => __( 'Style 12', 'thrive-cb' ),
),
'style-13' => array(
'label' => __( 'Style 13', 'thrive-cb' ),
),
'style-14' => array(
'label' => __( 'Style 14', 'thrive-cb' ),
),
'style-15' => array(
'label' => __( 'Style 15', 'thrive-cb' ),
),
),
'default' => 'default',
),
),
'DropdownIcon' => array(
'config' => array(
'name' => __( 'Dropdown Icon', 'thrive-cb' ),
'options' => $dropdown_icons,
),
'paths' => $dropdown_svg,
),
'DropdownAnimation' => array(
'config' => array(
'name' => __( 'Dropdown Animation', 'thrive-cb' ),
'options' => array(
'' => __( 'None (instant)', 'thrive-cb' ),
'da-fade' => __( 'Fade In and Out ', 'thrive-cb' ),
'da-slide' => __( 'Slide Down', 'thrive-cb' ),
'da-fold' => __( 'Fold Out', 'thrive-cb' ),
),
),
'extends' => 'Select',
),
'AnswerTag' => array(
'config' => array(
'default' => false,
'label' => __( 'Send answer as tag', 'thrive-cb' ),
'info' => true,
),
'extends' => 'Switch',
),
),
),
'typography' => [
'disabled_controls' => [ 'TextAlign' ],
'config' => [
'FontSize' => $controls_default_config,
'FontColor' => $controls_default_config,
'FontFace' => $controls_default_config,
'LetterSpacing' => $controls_default_config,
'LineHeight' => $controls_default_config,
'TextAlign' => $controls_default_config,
'TextStyle' => $controls_default_config,
'TextTransform' => $controls_default_config,
],
],
'layout' => [
'disabled_controls' => [
'Width',
'Height',
'Alignment',
'.tve-advanced-controls',
],
],
'animation' => [
'hidden' => true,
],
'styles-templates' => [],
'responsive' => [
'hidden' => true,
],
);
return array_merge( $components, $this->group_component() );
}
public function get_icon_styles() {
return [
'style_1' => [
'label' => 'Angle',
'up' => '<path d="M151.5 347.8L3.5 201c-4.7-4.7-4.7-12.3 0-17l19.8-19.8c4.7-4.7 12.3-4.7 17 0L160 282.7l119.7-118.5c4.7-4.7 12.3-4.7 17 0l19.8 19.8c4.7 4.7 4.7 12.3 0 17l-148 146.8c-4.7 4.7-12.3 4.7-17 0z"/>',
'box' => '0 0 320 512',
],
'style_2' => [
'label' => 'Chevron',
'up' => '<path d="M443.5 162.6l-7.1-7.1c-4.7-4.7-12.3-4.7-17 0L224 351 28.5 155.5c-4.7-4.7-12.3-4.7-17 0l-7.1 7.1c-4.7 4.7-4.7 12.3 0 17l211 211.1c4.7 4.7 12.3 4.7 17 0l211-211.1c4.8-4.7 4.8-12.3.1-17z"/>',
'box' => '0 0 448 512',
],
'style_3' => [
'label' => 'Caret',
'up' => '<path d="M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z"/>',
'box' => '0 0 320 512',
],
'style_4' => [
'label' => 'Triangle',
'up' => '<path d="M272 160H48.1c-42.6 0-64.2 51.7-33.9 81.9l111.9 112c18.7 18.7 49.1 18.7 67.9 0l112-112c30-30.1 8.7-81.9-34-81.9zM160 320L48 208h224L160 320z"/>',
'box' => '0 0 320 512',
],
];
}
}

View File

@@ -0,0 +1,165 @@
<?php
/**
* Thrive Themes - https://thrivethemes.com
*
* @package TCB2.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Silence is golden
}
class TCB_Lead_Generation_Submit_Element extends TCB_Element_Abstract {
public function name() {
return __( 'Lead Generation Submit', 'thrive-cb' );
}
public function identifier() {
return '.tve_lg_submit';
}
public function hide() {
return true;
}
public function own_components() {
$prefix_config = tcb_selection_root();
$controls_default_config = [
'css_suffix' => ' button',
'css_prefix' => $prefix_config . ' ',
];
$submit = array(
'lead_generation_submit' => array(
'config' => array(
'icon_side' => array(
'css_suffix' => ' .thrv_icon',
'css_prefix' => $prefix_config . ' ',
'config' => array(
'name' => __( 'Icon Side', 'thrive-cb' ),
'buttons' => array(
array(
'value' => 'left',
'text' => __( 'Left', 'thrive-cb' ),
),
array(
'value' => 'right',
'text' => __( 'Right', 'thrive-cb' ),
),
),
),
),
'ButtonWidth' => array(
'css_prefix' => $prefix_config . ' ',
'config' => array(
'default' => '100',
'min' => '10',
'max' => '100',
'label' => __( 'Button width', 'thrive-cb' ),
'um' => [ '%' ],
'css' => 'width',
),
'extends' => 'Slider',
),
'ButtonAlign' => array(
'config' => array(
'name' => __( 'Button Align', 'thrive-cb' ),
'buttons' => [
[
'icon' => 'a_left',
'text' => '',
'value' => 'left',
'default' => true,
],
[
'icon' => 'a_center',
'text' => '',
'value' => 'center',
],
[
'icon' => 'a_right',
'text' => '',
'value' => 'right',
],
[
'icon' => 'a_full-width',
'text' => '',
'value' => 'justify',
],
],
),
'extends' => 'ButtonGroup',
),
'style' => array(
'css_suffix' => ' button',
'css_prefix' => $prefix_config . ' ',
'config' => array(
'label' => __( 'Style', 'thrive-cb' ),
'items' => [],
'default' => 'default',
),
),
),
),
'typography' => [
'config' => [
'FontSize' => $controls_default_config,
'FontColor' => $controls_default_config,
'TextAlign' => $controls_default_config,
'TextStyle' => $controls_default_config,
'TextTransform' => $controls_default_config,
'FontFace' => $controls_default_config,
'LineHeight' => $controls_default_config,
'LetterSpacing' => $controls_default_config,
],
],
'layout' => [
'disabled_controls' => [
'Width',
'Height',
'Alignment',
'.tve-advanced-controls',
],
'config' => [
'MarginAndPadding' => $controls_default_config,
],
],
'borders' => [
'config' => [
'Borders' => $controls_default_config,
'Corners' => $controls_default_config,
],
],
'animation' => [
'hidden' => true,
],
'background' => [
'config' => [
'ColorPicker' => $controls_default_config,
'PreviewList' => $controls_default_config,
],
],
'shadow' => [
'config' => $controls_default_config,
],
'styles-templates' => [
'config' => [
'to' => 'button',
],
],
'responsive' => [
'hidden' => true,
],
);
return $submit;
}
/**
* @return bool
*/
public function has_hover_state() {
return true;
}
}

View File

@@ -0,0 +1,170 @@
<?php
/**
* Thrive Themes - https://thrivethemes.com
*
* @package TCB2.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Silence is golden
}
class TCB_Lead_Generation_Textarea_Element extends TCB_Element_Abstract {
public function name() {
return __( 'Form Textarea', 'thrive-cb' );
}
public function identifier() {
return '.tve_lg_textarea';
}
public function hide() {
return true;
}
public function own_components() {
$prefix_config = tcb_selection_root();
$controls_default_config = [
'css_suffix' => [ ' input', ' textarea' ],
'css_prefix' => $prefix_config . ' ',
];
$controls_default_config_text = [
'css_suffix' => [
' input',
' textarea',
' input::placeholder',
' textarea::placeholder',
],
'css_prefix' => $prefix_config . ' ',
];
return array(
'lead_generation_textarea' => array(
'config' => array(
'placeholder' => array(
'config' => array(
'label' => __( 'Placeholder', 'thrive-cb' ),
),
),
'ShowLabel' => array(
'config' => array(
'name' => '',
'label' => __( 'Show Label', 'thrive-cb' ),
'default' => true,
),
'extends' => 'Switch',
),
'ShowCounter' => array(
'config' => array(
'name' => '',
'label' => __( 'Show Character Count', 'thrive-cb' ),
'default' => true,
),
'extends' => 'Switch',
),
'Resizing' => array(
'config' => array(
'name' => '',
'label' => __( 'Disable User Resizing', 'thrive-cb' ),
'default' => true,
'info' => true,
),
'extends' => 'Switch',
),
'Rows' => array(
'config' => array(
'name' => __( 'Rows / Visible Lines', 'thrive-cb' ),
'default' => 3,
'min' => 1,
'max' => 100,
'maxlength' => 2,
),
'extends' => 'Input',
),
'MinChar' => array(
'config' => array(
'label' => __( 'Min. Characters', 'thrive-cb' ),
'default' => 10,
'min' => 0,
'max' => 350,
'info' => true,
'size' => 'medium',
),
'extends' => 'Input',
),
'MaxChar' => array(
'config' => array(
'label' => __( 'Max. Characters', 'thrive-cb' ),
'default' => 350,
'min' => 0,
'max' => 10000,
'info' => true,
'size' => 'medium',
),
'extends' => 'Input',
),
),
),
'typography' => [
'config' => [
'FontSize' => $controls_default_config_text,
'FontColor' => $controls_default_config_text,
'FontFace' => $controls_default_config_text,
'LetterSpacing' => $controls_default_config_text,
'LineHeight' => $controls_default_config_text,
'TextAlign' => $controls_default_config_text,
'TextStyle' => $controls_default_config_text,
'TextTransform' => $controls_default_config_text,
],
],
'layout' => [
'disabled_controls' => [
'Width',
'Height',
'Alignment',
'.tve-advanced-controls',
],
'config' => [
'MarginAndPadding' => [
'margin_suffix' => '',
'padding_suffix' => [ ' input', ' textarea' ],
'css_prefix' => $prefix_config . ' ',
],
],
],
'borders' => [
'config' => [
'Borders' => $controls_default_config,
'Corners' => $controls_default_config,
],
],
'animation' => [
'hidden' => true,
],
'background' => [
'config' => [
'ColorPicker' => $controls_default_config,
'PreviewList' => $controls_default_config,
],
],
'shadow' => [
'config' => $controls_default_config,
],
'styles-templates' => [
'config' => [],
],
'responsive' => [
'hidden' => true,
],
);
}
/**
* @return bool
*/
public function has_hover_state() {
return true;
}
}