Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/clone/wp-conte.../themes/Divi/includes/builder
File: class-et-builder-element.php
}
[6500] Fix | Delete
}
[6501] Fix | Delete
[6502] Fix | Delete
$this->_additional_fields_options = array_merge( $this->_additional_fields_options, $additional_child_options );
[6503] Fix | Delete
}
[6504] Fix | Delete
[6505] Fix | Delete
/**
[6506] Fix | Delete
* Add the divider options to the additional_fields_options array.
[6507] Fix | Delete
*/
[6508] Fix | Delete
protected function _add_divider_fields() {
[6509] Fix | Delete
if ( ! $this->has_vb_support() && ! $this->has_advanced_fields ) {
[6510] Fix | Delete
return;
[6511] Fix | Delete
}
[6512] Fix | Delete
[6513] Fix | Delete
// Make sure we only add this to sections.
[6514] Fix | Delete
if ( 'et_pb_section' !== $this->slug ) {
[6515] Fix | Delete
return;
[6516] Fix | Delete
}
[6517] Fix | Delete
[6518] Fix | Delete
$tab_slug = 'advanced';
[6519] Fix | Delete
$toggle_slug = 'dividers';
[6520] Fix | Delete
$divider_toggle = array(
[6521] Fix | Delete
$toggle_slug => array(
[6522] Fix | Delete
'title' => esc_html__( 'Dividers', 'et_builder' ),
[6523] Fix | Delete
'priority' => 65,
[6524] Fix | Delete
),
[6525] Fix | Delete
);
[6526] Fix | Delete
[6527] Fix | Delete
// Add the toggle sections.
[6528] Fix | Delete
$this->_add_settings_modal_toggles( $tab_slug, $divider_toggle );
[6529] Fix | Delete
[6530] Fix | Delete
if ( ! isset( $this->advanced_fields['dividers'] ) ) {
[6531] Fix | Delete
$this->advanced_fields['dividers'] = array();
[6532] Fix | Delete
}
[6533] Fix | Delete
[6534] Fix | Delete
$additional_options = ET_Builder_Module_Fields_Factory::get( 'Divider' )->get_fields( array(
[6535] Fix | Delete
'tab_slug' => $tab_slug,
[6536] Fix | Delete
'toggle_slug' => $toggle_slug,
[6537] Fix | Delete
) );
[6538] Fix | Delete
[6539] Fix | Delete
// Return our merged options and toggles.
[6540] Fix | Delete
$this->_additional_fields_options = array_merge( $this->_additional_fields_options, $additional_options );
[6541] Fix | Delete
}
[6542] Fix | Delete
[6543] Fix | Delete
/**
[6544] Fix | Delete
* Add additional Text Shadow fields to all modules
[6545] Fix | Delete
*/
[6546] Fix | Delete
protected function _add_text_shadow_fields() {
[6547] Fix | Delete
// Get text shadow settings. Fallback to default if needed
[6548] Fix | Delete
$this->advanced_fields['text_shadow'] = self::$_->array_get( $this->advanced_fields, 'text_shadow', array(
[6549] Fix | Delete
'default' => array(),
[6550] Fix | Delete
) );
[6551] Fix | Delete
[6552] Fix | Delete
// Text shadow settings have to be array
[6553] Fix | Delete
if ( ! is_array( $this->advanced_fields['text_shadow'] ) ) {
[6554] Fix | Delete
return;
[6555] Fix | Delete
}
[6556] Fix | Delete
[6557] Fix | Delete
// Loop test settings, do multiple text shadow field declaration in one palce
[6558] Fix | Delete
foreach ( $this->advanced_fields['text_shadow'] as $text_shadow_name => $text_shadow_fields ) {
[6559] Fix | Delete
// Enable module to disable text shadow. Also disable text shadow if no text group is
[6560] Fix | Delete
// found because default text shadow lives on text group
[6561] Fix | Delete
if ( 'default' === $text_shadow_name && ( false === $text_shadow_fields || empty( $this->settings_modal_toggles['advanced']['toggles']['text'] ) ) ) {
[6562] Fix | Delete
return;
[6563] Fix | Delete
}
[6564] Fix | Delete
[6565] Fix | Delete
if ( 'default' !== $text_shadow_name ) {
[6566] Fix | Delete
// Automatically add prefix and toggle slug
[6567] Fix | Delete
$text_shadow_fields['prefix'] = $text_shadow_name;
[6568] Fix | Delete
$text_shadow_fields['toggle_slug'] = $text_shadow_name;
[6569] Fix | Delete
}
[6570] Fix | Delete
[6571] Fix | Delete
// Add text shadow fields
[6572] Fix | Delete
$this->_additional_fields_options = array_merge(
[6573] Fix | Delete
$this->_additional_fields_options,
[6574] Fix | Delete
$this->text_shadow->get_fields( $text_shadow_fields )
[6575] Fix | Delete
);
[6576] Fix | Delete
[6577] Fix | Delete
}
[6578] Fix | Delete
}
[6579] Fix | Delete
[6580] Fix | Delete
/**
[6581] Fix | Delete
* Add box shadow fields based on configuration on $this->advanced_fields['box_shadow']
[6582] Fix | Delete
*
[6583] Fix | Delete
* @since 3.1
[6584] Fix | Delete
*/
[6585] Fix | Delete
protected function _add_box_shadow_fields() {
[6586] Fix | Delete
// BOX shadow fields are added by default to all modules
[6587] Fix | Delete
$this->advanced_fields['box_shadow'] = self::$_->array_get( $this->advanced_fields, 'box_shadow', array(
[6588] Fix | Delete
'default' => array(),
[6589] Fix | Delete
) );
[6590] Fix | Delete
[6591] Fix | Delete
// Box shadow settings have to be array
[6592] Fix | Delete
if ( ! is_array( $this->advanced_fields['box_shadow'] ) ) {
[6593] Fix | Delete
return;
[6594] Fix | Delete
}
[6595] Fix | Delete
[6596] Fix | Delete
$i18n =& self::$i18n;
[6597] Fix | Delete
[6598] Fix | Delete
if ( ! isset( $i18n['box_shadow'] ) ) {
[6599] Fix | Delete
// phpcs:disable WordPress.WP.I18n.MissingTranslatorsComment
[6600] Fix | Delete
$i18n['box_shadow'] = array(
[6601] Fix | Delete
'title' => esc_html__( 'Box Shadow', 'et_builder' ),
[6602] Fix | Delete
);
[6603] Fix | Delete
// phpcs:enable
[6604] Fix | Delete
}
[6605] Fix | Delete
[6606] Fix | Delete
// Loop box shadow settings
[6607] Fix | Delete
foreach ( $this->advanced_fields['box_shadow'] as $fields_name => $settings ) {
[6608] Fix | Delete
// Enable module to disable box shadow
[6609] Fix | Delete
if ( false === $settings ) {
[6610] Fix | Delete
continue;
[6611] Fix | Delete
}
[6612] Fix | Delete
[6613] Fix | Delete
$is_box_shadow_default = 'default' === $fields_name;
[6614] Fix | Delete
[6615] Fix | Delete
// Add Box Shadow toggle for default Box Shadow fields
[6616] Fix | Delete
if ( $is_box_shadow_default ) {
[6617] Fix | Delete
$this->settings_modal_toggles['advanced']['toggles']['box_shadow'] = array(
[6618] Fix | Delete
'title' => $i18n['box_shadow']['title'],
[6619] Fix | Delete
'priority' => 100,
[6620] Fix | Delete
);
[6621] Fix | Delete
}
[6622] Fix | Delete
[6623] Fix | Delete
// Ensure box settings has minimum settings required
[6624] Fix | Delete
$settings = wp_parse_args( $settings, array(
[6625] Fix | Delete
'option_category' => 'layout',
[6626] Fix | Delete
'tab_slug' => 'advanced',
[6627] Fix | Delete
'toggle_slug' => 'box_shadow',
[6628] Fix | Delete
) );
[6629] Fix | Delete
[6630] Fix | Delete
// Automatically add suffix attribute
[6631] Fix | Delete
$settings['suffix'] = $is_box_shadow_default ? '' : "_{$fields_name}";
[6632] Fix | Delete
[6633] Fix | Delete
// Add default Box Shadow fields
[6634] Fix | Delete
$this->_additional_fields_options = array_merge(
[6635] Fix | Delete
$this->_additional_fields_options,
[6636] Fix | Delete
ET_Builder_Module_Fields_Factory::get( 'BoxShadow' )->get_fields( $settings )
[6637] Fix | Delete
);
[6638] Fix | Delete
}
[6639] Fix | Delete
}
[6640] Fix | Delete
[6641] Fix | Delete
/**
[6642] Fix | Delete
* Add form field fields based on configuration on $this->advanced_fields['field'].
[6643] Fix | Delete
*
[6644] Fix | Delete
* @since 3.23
[6645] Fix | Delete
*/
[6646] Fix | Delete
protected function _add_form_field_fields() {
[6647] Fix | Delete
// Disable if module doesn't set advanced_fields property and has no VB support.
[6648] Fix | Delete
if ( ! $this->has_advanced_fields ) {
[6649] Fix | Delete
return;
[6650] Fix | Delete
}
[6651] Fix | Delete
[6652] Fix | Delete
// Form field settings have to be an array.
[6653] Fix | Delete
if ( ! is_array( self::$_->array_get( $this->advanced_fields, 'form_field' ) ) ) {
[6654] Fix | Delete
return;
[6655] Fix | Delete
}
[6656] Fix | Delete
[6657] Fix | Delete
$additional_options = array();
[6658] Fix | Delete
$hover = et_pb_hover_options();
[6659] Fix | Delete
[6660] Fix | Delete
$this->set_i18n_font();
[6661] Fix | Delete
$i18n =& self::$i18n;
[6662] Fix | Delete
[6663] Fix | Delete
// Fetch the form field.
[6664] Fix | Delete
foreach( $this->advanced_fields['form_field'] as $option_name => $option_settings ) {
[6665] Fix | Delete
$toggle_slug = '';
[6666] Fix | Delete
$tab_slug = isset( $option_settings['tab_slug'] ) ? $option_settings['tab_slug'] : 'advanced';
[6667] Fix | Delete
$toggle_disabled = isset( $option_settings['disable_toggle'] ) && $option_settings['disable_toggle'];
[6668] Fix | Delete
[6669] Fix | Delete
// Add form field options group if it's enabled.
[6670] Fix | Delete
if ( ! $toggle_disabled ) {
[6671] Fix | Delete
$toggle_slug = isset( $option_settings['toggle_slug'] ) ? $option_settings['toggle_slug'] : $option_name;
[6672] Fix | Delete
$toggle_priority = isset( $option_settings['toggle_priority'] ) ? $option_settings['toggle_priority'] : 20;
[6673] Fix | Delete
[6674] Fix | Delete
$field_toggle = array(
[6675] Fix | Delete
$option_name => array(
[6676] Fix | Delete
'title' => esc_html( $option_settings['label'] ),
[6677] Fix | Delete
'priority' => $toggle_priority,
[6678] Fix | Delete
),
[6679] Fix | Delete
);
[6680] Fix | Delete
[6681] Fix | Delete
$this->_add_settings_modal_toggles( $tab_slug, $field_toggle );
[6682] Fix | Delete
}
[6683] Fix | Delete
[6684] Fix | Delete
// Background Color.
[6685] Fix | Delete
$bg_color_options = isset( $option_settings['background_color'] ) ? $option_settings['background_color'] : true;
[6686] Fix | Delete
if ( $bg_color_options ) {
[6687] Fix | Delete
$bg_color_args = is_array( $bg_color_options ) ? $bg_color_options : array();
[6688] Fix | Delete
$additional_options["{$option_name}_background_color"] = array_merge( array(
[6689] Fix | Delete
'label' => sprintf( esc_html__( '%1$s Background Color', 'et_builder' ), $option_settings['label'] ),
[6690] Fix | Delete
'description' => esc_html__( 'Pick a color to fill the module\'s input fields.', 'et_builder' ),
[6691] Fix | Delete
'type' => 'color-alpha',
[6692] Fix | Delete
'option_category' => 'field',
[6693] Fix | Delete
'custom_color' => true,
[6694] Fix | Delete
'tab_slug' => $tab_slug,
[6695] Fix | Delete
'toggle_slug' => $toggle_slug,
[6696] Fix | Delete
'hover' => 'tabs',
[6697] Fix | Delete
'mobile_options' => true,
[6698] Fix | Delete
), $bg_color_args );
[6699] Fix | Delete
}
[6700] Fix | Delete
[6701] Fix | Delete
// Text Color.
[6702] Fix | Delete
$additional_options["{$option_name}_text_color"] = array(
[6703] Fix | Delete
'label' => sprintf( $i18n['font']['color']['label'], $option_settings['label'] ),
[6704] Fix | Delete
'description' => esc_html__( 'Pick a color to be used for the text written inside input fields.', 'et_builder' ),
[6705] Fix | Delete
'type' => 'color-alpha',
[6706] Fix | Delete
'option_category' => 'field',
[6707] Fix | Delete
'custom_color' => true,
[6708] Fix | Delete
'tab_slug' => $tab_slug,
[6709] Fix | Delete
'toggle_slug' => $toggle_slug,
[6710] Fix | Delete
'hover' => 'tabs',
[6711] Fix | Delete
'mobile_options' => true,
[6712] Fix | Delete
);
[6713] Fix | Delete
[6714] Fix | Delete
// Focus Background Color.
[6715] Fix | Delete
$additional_options["{$option_name}_focus_background_color"] = array(
[6716] Fix | Delete
'label' => sprintf( esc_html__( '%1$s Focus Background Color', 'et_builder' ), $option_settings['label'] ),
[6717] Fix | Delete
'description' => esc_html__( 'When a visitor clicks into an input field, it becomes focused. You can pick a color to be used for the input field background while focused.', 'et_builder' ),
[6718] Fix | Delete
'type' => 'color-alpha',
[6719] Fix | Delete
'option_category' => 'field',
[6720] Fix | Delete
'custom_color' => true,
[6721] Fix | Delete
'tab_slug' => $tab_slug,
[6722] Fix | Delete
'toggle_slug' => $toggle_slug,
[6723] Fix | Delete
'hover' => 'tabs',
[6724] Fix | Delete
'mobile_options' => true,
[6725] Fix | Delete
);
[6726] Fix | Delete
[6727] Fix | Delete
// Focus Text Color.
[6728] Fix | Delete
$additional_options["{$option_name}_focus_text_color"] = array(
[6729] Fix | Delete
'label' => sprintf( esc_html__( '%1$s Focus Text Color', 'et_builder' ), $option_settings['label'] ),
[6730] Fix | Delete
'description' => esc_html__( 'When a visitor clicks into an input field, it becomes focused. You can pick a color to be used for the input text while focused.', 'et_builder' ),
[6731] Fix | Delete
'type' => 'color-alpha',
[6732] Fix | Delete
'option_category' => 'field',
[6733] Fix | Delete
'custom_color' => true,
[6734] Fix | Delete
'tab_slug' => $tab_slug,
[6735] Fix | Delete
'toggle_slug' => $toggle_slug,
[6736] Fix | Delete
'hover' => 'tabs',
[6737] Fix | Delete
'mobile_options' => true,
[6738] Fix | Delete
);
[6739] Fix | Delete
[6740] Fix | Delete
// Font - Add current font settings into advanced fields. The font_field is basically
[6741] Fix | Delete
// combination of fonts (options group) + fields (type), but plural suffix is removed
[6742] Fix | Delete
// because there are some case we just need one field declaration for child module.
[6743] Fix | Delete
$font_options = isset( $option_settings['font_field'] ) ? $option_settings['font_field'] : true;
[6744] Fix | Delete
if ( $font_options ) {
[6745] Fix | Delete
$font_args = is_array( $font_options ) ? $font_options : array();
[6746] Fix | Delete
$font_settings = array_merge( array(
[6747] Fix | Delete
'label' => sprintf( esc_html__( '%1$s', 'et_builder' ), $option_settings['label'] ),
[6748] Fix | Delete
'tab_slug' => $tab_slug,
[6749] Fix | Delete
'toggle_slug' => $toggle_slug,
[6750] Fix | Delete
// Text color will be handled by form field function.
[6751] Fix | Delete
'hide_text_color' => true,
[6752] Fix | Delete
), $font_args );
[6753] Fix | Delete
self::$_->array_set( $this->advanced_fields, "fonts.{$option_name}", $font_settings );
[6754] Fix | Delete
}
[6755] Fix | Delete
[6756] Fix | Delete
// Add custom margin-padding to form field options.
[6757] Fix | Delete
$margin_padding_options = isset( $option_settings['margin_padding'] ) ? $option_settings['margin_padding'] : true;
[6758] Fix | Delete
if ( $margin_padding_options ) {
[6759] Fix | Delete
$margin_padding_args = is_array( $margin_padding_options ) ? $margin_padding_options : array();
[6760] Fix | Delete
$margin_padding_settings = array_merge( array(
[6761] Fix | Delete
'label' => $option_settings['label'],
[6762] Fix | Delete
'prefix' => $option_name,
[6763] Fix | Delete
'tab_slug' => $tab_slug,
[6764] Fix | Delete
'toggle_slug' => $toggle_slug,
[6765] Fix | Delete
), $margin_padding_args );
[6766] Fix | Delete
$additional_options = array_merge( $additional_options, $this->margin_padding->get_fields( $margin_padding_settings ) );
[6767] Fix | Delete
}
[6768] Fix | Delete
[6769] Fix | Delete
// Border Styles - Ensure borders attribute is exist in advanced fields. If it's not,
[6770] Fix | Delete
// add borders property and set empty default.
[6771] Fix | Delete
$borders_options = isset( $option_settings['border_styles'] ) ? $option_settings['border_styles'] : true;
[6772] Fix | Delete
if ( $borders_options ) {
[6773] Fix | Delete
if ( ! isset( $this->advanced_fields['borders'] ) ) {
[6774] Fix | Delete
self::$_->array_set( $this->advanced_fields, 'borders.default', array() );
[6775] Fix | Delete
}
[6776] Fix | Delete
[6777] Fix | Delete
// Border Styles - Add current borders settings into advanced fields.
[6778] Fix | Delete
$border_style_options = self::$_->array_get( $option_settings, "border_styles.{$option_name}", array() );
[6779] Fix | Delete
$border_style_name = ! empty( $border_style_options['name'] ) ? $border_style_options['name'] : $option_name;
[6780] Fix | Delete
$border_style_settings = array_merge( array(
[6781] Fix | Delete
'option_category' => 'field',
[6782] Fix | Delete
'tab_slug' => $tab_slug,
[6783] Fix | Delete
'toggle_slug' => $toggle_slug,
[6784] Fix | Delete
'defaults' => array(
[6785] Fix | Delete
'border_radii' => 'on|3px|3px|3px|3px',
[6786] Fix | Delete
'border_styles' => array(
[6787] Fix | Delete
'width' => '0px',
[6788] Fix | Delete
'color' => '#333333',
[6789] Fix | Delete
'style' => 'solid',
[6790] Fix | Delete
),
[6791] Fix | Delete
),
[6792] Fix | Delete
'fields_after' => array(
[6793] Fix | Delete
'use_focus_border_color' => array(
[6794] Fix | Delete
'label' => esc_html__( 'Use Focus Borders', 'et_builder' ),
[6795] Fix | Delete
'description' => esc_html__( 'Enabling this option will add borders to input fields when focused.', 'et_builder' ),
[6796] Fix | Delete
'type' => 'yes_no_button',
[6797] Fix | Delete
'option_category' => 'color_option',
[6798] Fix | Delete
'options' => array(
[6799] Fix | Delete
'off' => et_builder_i18n( 'No' ),
[6800] Fix | Delete
'on' => et_builder_i18n( 'Yes' ),
[6801] Fix | Delete
),
[6802] Fix | Delete
'affects' => array(
[6803] Fix | Delete
"border_radii_{$toggle_slug}_focus",
[6804] Fix | Delete
"border_styles_{$toggle_slug}_focus",
[6805] Fix | Delete
),
[6806] Fix | Delete
'tab_slug' => $tab_slug,
[6807] Fix | Delete
'toggle_slug' => $toggle_slug,
[6808] Fix | Delete
'default_on_front' => 'off',
[6809] Fix | Delete
),
[6810] Fix | Delete
),
[6811] Fix | Delete
), $border_style_options );
[6812] Fix | Delete
self::$_->array_set( $this->advanced_fields, "borders.{$border_style_name}", $border_style_settings );
[6813] Fix | Delete
[6814] Fix | Delete
// Border Styles Focus - Add current borders focus settings into advanced fields.
[6815] Fix | Delete
$border_style_focus_options = self::$_->array_get( $option_settings, "border_styles.{$option_name}_focus", array() );
[6816] Fix | Delete
$border_style_focus_settings = array_merge( array(
[6817] Fix | Delete
'option_category' => 'field',
[6818] Fix | Delete
'tab_slug' => $tab_slug,
[6819] Fix | Delete
'toggle_slug' => $toggle_slug,
[6820] Fix | Delete
'depends_on' => array( 'use_focus_border_color' ),
[6821] Fix | Delete
'depends_show_if' => 'on',
[6822] Fix | Delete
'defaults' => array(
[6823] Fix | Delete
'border_radii' => 'on|3px|3px|3px|3px',
[6824] Fix | Delete
'border_styles' => array(
[6825] Fix | Delete
'width' => '0px',
[6826] Fix | Delete
'color' => '#333333',
[6827] Fix | Delete
'style' => 'solid',
[6828] Fix | Delete
),
[6829] Fix | Delete
),
[6830] Fix | Delete
), $border_style_focus_options );
[6831] Fix | Delete
self::$_->array_set( $this->advanced_fields, "borders.{$border_style_name}_focus", $border_style_focus_settings );
[6832] Fix | Delete
}
[6833] Fix | Delete
[6834] Fix | Delete
// Box Shadow - Ensure box shadow attribute is exist in advanced fields. If it's not,
[6835] Fix | Delete
// add box_shadow property and set empty default.
[6836] Fix | Delete
$box_shadow_options = isset( $option_settings['box_shadow'] ) ? $option_settings['box_shadow'] : true;
[6837] Fix | Delete
if ( $box_shadow_options ) {
[6838] Fix | Delete
if ( ! isset( $this->advanced_fields['box_shadow'] ) ) {
[6839] Fix | Delete
self::$_->array_set( $this->advanced_fields, 'box_shadow.default', array() );
[6840] Fix | Delete
}
[6841] Fix | Delete
[6842] Fix | Delete
$box_shadow_args = is_array( $box_shadow_options ) ? $box_shadow_options : array();
[6843] Fix | Delete
$box_shadow_name = ! empty( $box_shadow_options['name'] ) ? $box_shadow_options['name'] : $option_name;
[6844] Fix | Delete
[6845] Fix | Delete
// Box Shadow - Add current box shadow settings into advanced fields.
[6846] Fix | Delete
$box_shadow_settings = array_merge( array(
[6847] Fix | Delete
'label' => sprintf( esc_html__( '%1$s Box Shadow', 'et_builder' ), $option_settings['label'] ),
[6848] Fix | Delete
'option_category' => 'layout',
[6849] Fix | Delete
'tab_slug' => $tab_slug,
[6850] Fix | Delete
'toggle_slug' => $toggle_slug,
[6851] Fix | Delete
), $box_shadow_args );
[6852] Fix | Delete
self::$_->array_set( $this->advanced_fields, "box_shadow.{$box_shadow_name}", $box_shadow_settings );
[6853] Fix | Delete
}
[6854] Fix | Delete
}
[6855] Fix | Delete
[6856] Fix | Delete
$this->_additional_fields_options = array_merge( $this->_additional_fields_options, $additional_options );
[6857] Fix | Delete
}
[6858] Fix | Delete
[6859] Fix | Delete
public function get_transition_box_shadow_fields_css_props( $module = 'default' ) {
[6860] Fix | Delete
/**
[6861] Fix | Delete
* @var ET_Builder_Module_Field_BoxShadow $box_shadow
[6862] Fix | Delete
*/
[6863] Fix | Delete
$box_shadow = ET_Builder_Module_Fields_Factory::get( 'BoxShadow' );
[6864] Fix | Delete
$selector = self::$_->array_get( $this->advanced_fields, "box_shadow.$module.css.main", '%%order_class%%' );
[6865] Fix | Delete
$overlay = self::$_->array_get( $this->advanced_fields, "box_shadow.$module.css.overlay", false );
[6866] Fix | Delete
$suffix = 'default' == $module ? '' : "_$module";
[6867] Fix | Delete
[6868] Fix | Delete
if ( in_array( $overlay, array( 'inset', 'always' ) ) ) {
[6869] Fix | Delete
$selector .= ', ' . $box_shadow->get_overlay_selector( $selector );
[6870] Fix | Delete
}
[6871] Fix | Delete
[6872] Fix | Delete
return array(
[6873] Fix | Delete
"box_shadow_horizontal{$suffix}" => array( 'box-shadow' => $selector, ),
[6874] Fix | Delete
"box_shadow_vertical{$suffix}" => array( 'box-shadow' => $selector, ),
[6875] Fix | Delete
"box_shadow_blur{$suffix}" => array( 'box-shadow' => $selector, ),
[6876] Fix | Delete
"box_shadow_spread{$suffix}" => array( 'box-shadow' => $selector, ),
[6877] Fix | Delete
"box_shadow_color{$suffix}" => array( 'box-shadow' => $selector, ),
[6878] Fix | Delete
);
[6879] Fix | Delete
}
[6880] Fix | Delete
[6881] Fix | Delete
public function get_transition_text_shadow_fields_css_props( $module = null ) {
[6882] Fix | Delete
$source = null == $module ? 'text.css' : "fonts.$module.css";
[6883] Fix | Delete
$default = self::$_->array_get( $this->advanced_fields, "$source.main", '%%order_class%%' );
[6884] Fix | Delete
$selector = self::$_->array_get( $this->advanced_fields, "$source.text_shadow", $default );
[6885] Fix | Delete
$prefix = null == $module ? '' : "{$module}_";
[6886] Fix | Delete
[6887] Fix | Delete
return array(
[6888] Fix | Delete
"{$prefix}text_shadow_horizontal_length" => array( 'text-shadow' => $selector, ),
[6889] Fix | Delete
"{$prefix}text_shadow_vertical_length" => array( 'text-shadow' => $selector, ),
[6890] Fix | Delete
"{$prefix}text_shadow_blur_strength" => array( 'text-shadow' => $selector, ),
[6891] Fix | Delete
"{$prefix}text_shadow_color" => array( 'text-shadow' => $selector, ),
[6892] Fix | Delete
);
[6893] Fix | Delete
}
[6894] Fix | Delete
[6895] Fix | Delete
public function get_transition_filters_fields_css_props( $module = null ) {
[6896] Fix | Delete
$slug = empty( $module ) ? 'filter' : 'child_filter';
[6897] Fix | Delete
$source = empty( $module ) ? 'filters.css.main' : "$module.css.main";
[6898] Fix | Delete
$filters = array( 'hue_rotate', 'saturate', 'brightness', 'contrast', 'invert', 'sepia', 'opacity', 'blur', );
[6899] Fix | Delete
$fields = array();
[6900] Fix | Delete
$main = self::$_->array_get( $this->advanced_fields, $source, '%%order_class%%' );
[6901] Fix | Delete
$selector = $module ? self::$_->array_get( $this->advanced_fields, 'filters.child_filters_target.css.main', $main ) : $main;
[6902] Fix | Delete
[6903] Fix | Delete
foreach ( $filters as $filter ) {
[6904] Fix | Delete
$fields[ "{$slug}_{$filter}" ] = array( 'filter' => $selector, );
[6905] Fix | Delete
}
[6906] Fix | Delete
[6907] Fix | Delete
return $fields;
[6908] Fix | Delete
}
[6909] Fix | Delete
[6910] Fix | Delete
public function get_transition_borders_fields_css_props( $module = 'default' ) {
[6911] Fix | Delete
$suffix = 'default' == $module ? '' : "_$module";
[6912] Fix | Delete
$radius = self::$_->array_get( $this->advanced_fields, "borders.$module.css.main.border_radii", '%%order_class%%' );
[6913] Fix | Delete
$style = self::$_->array_get( $this->advanced_fields, "borders.$module.css.main.border_styles", '%%order_class%%' );
[6914] Fix | Delete
[6915] Fix | Delete
return array(
[6916] Fix | Delete
"border_radii{$suffix}" => array( 'border-radius' => implode( ', ', array( $radius, ) ) ),
[6917] Fix | Delete
"border_width_all{$suffix}" => array( 'border' => implode( ', ', array( $style, ) ), ),
[6918] Fix | Delete
"border_color_all{$suffix}" => array( 'border' => implode( ', ', array( $style, ) ), ),
[6919] Fix | Delete
"border_width_top{$suffix}" => array( 'border' => implode( ', ', array( $style, ) ), ),
[6920] Fix | Delete
"border_color_top{$suffix}" => array( 'border' => implode( ', ', array( $style, ) ), ),
[6921] Fix | Delete
"border_width_right{$suffix}" => array( 'border' => implode( ', ', array( $style, ) ), ),
[6922] Fix | Delete
"border_color_right{$suffix}" => array( 'border' => implode( ', ', array( $style, ) ), ),
[6923] Fix | Delete
"border_width_bottom{$suffix}" => array( 'border' => implode( ', ', array( $style, ) ), ),
[6924] Fix | Delete
"border_color_bottom{$suffix}" => array( 'border' => implode( ', ', array( $style, ) ), ),
[6925] Fix | Delete
"border_width_left{$suffix}" => array( 'border' => implode( ', ', array( $style, ) ), ),
[6926] Fix | Delete
"border_color_left{$suffix}" => array( 'border' => implode( ', ', array( $style, ) ), ),
[6927] Fix | Delete
);
[6928] Fix | Delete
}
[6929] Fix | Delete
[6930] Fix | Delete
public function get_transition_margin_padding_fields_css_props( $module = null ) {
[6931] Fix | Delete
$key = empty($module) ? '' : "$module.";
[6932] Fix | Delete
$suffix = empty($module) ? '' : "_$module";
[6933] Fix | Delete
$margin = self::$_->array_get( $this->advanced_fields, "margin_padding.{$key}css.margin", '%%order_class%%' );
[6934] Fix | Delete
$padding = self::$_->array_get( $this->advanced_fields, "margin_padding.{$key}css.padding", '%%order_class%%' );
[6935] Fix | Delete
[6936] Fix | Delete
return array(
[6937] Fix | Delete
"custom_margin{$suffix}" => array( 'margin' => implode( ', ', array( $margin, ) ) ),
[6938] Fix | Delete
"custom_padding{$suffix}" => array( 'padding' => implode( ', ', array( $padding, ) ), ),
[6939] Fix | Delete
);
[6940] Fix | Delete
}
[6941] Fix | Delete
[6942] Fix | Delete
public function get_transition_transform_css_props( $module = null ) {
[6943] Fix | Delete
$key = empty( $module ) ? '' : "$module.";
[6944] Fix | Delete
$suffix = empty( $module ) ? '' : "_$module";
[6945] Fix | Delete
$selector = self::$_->array_get( $this->advanced_fields, "transform.{$key}css.main", '%%order_class%%' );
[6946] Fix | Delete
/** @see ET_Builder_Module_Field_Transform */
[6947] Fix | Delete
$defaults = array( 'scale', 'translate', 'rotate', 'skew', 'origin' );
[6948] Fix | Delete
$fields = array();
[6949] Fix | Delete
foreach ( $defaults as $name ) {
[6950] Fix | Delete
$fields += array( "transform_{$name}{$suffix}" => array( 'transform' => implode( ', ', (array) $selector ) ) );
[6951] Fix | Delete
}
[6952] Fix | Delete
[6953] Fix | Delete
return $fields;
[6954] Fix | Delete
}
[6955] Fix | Delete
[6956] Fix | Delete
public function get_transition_position_css_props( $module = null ) {
[6957] Fix | Delete
$key = empty( $module ) ? '' : "$module.";
[6958] Fix | Delete
$suffix = empty( $module ) ? '' : "_$module";
[6959] Fix | Delete
$selector = self::$_->array_get( $this->advanced_fields, "position_fields.{$key}css.main", '%%order_class%%' );
[6960] Fix | Delete
$string_selector = implode( ', ', (array) $selector );
[6961] Fix | Delete
$fields = array();
[6962] Fix | Delete
[6963] Fix | Delete
$fields += array( "horizontal_offset{$suffix}" => array( 'left' => $string_selector, 'right' => $string_selector ) );
[6964] Fix | Delete
$fields += array( "vertical_offset{$suffix}" => array( 'top' => $string_selector, 'bottom' => $string_selector ) );
[6965] Fix | Delete
[6966] Fix | Delete
return $fields;
[6967] Fix | Delete
}
[6968] Fix | Delete
[6969] Fix | Delete
public function get_transition_font_fields_css_props() {
[6970] Fix | Delete
$items = self::$_->array_get( $this->advanced_fields, 'fonts' );
[6971] Fix | Delete
[6972] Fix | Delete
if ( !is_array( $items ) ) {
[6973] Fix | Delete
return array();
[6974] Fix | Delete
}
[6975] Fix | Delete
[6976] Fix | Delete
$font_options = array(
[6977] Fix | Delete
array( 'option' => 'text_color', 'slug' => 'color', 'prop' => 'color', ),
[6978] Fix | Delete
array( 'option' => 'font_size', 'slug' => 'font_size', 'prop' => 'font-size', ),
[6979] Fix | Delete
array( 'option' => 'line_height', 'slug' => 'line_height', 'prop' => 'line-height', ),
[6980] Fix | Delete
array( 'option' => 'letter_spacing', 'slug' => 'letter_spacing', 'prop' => 'letter-spacing', ),
[6981] Fix | Delete
array( 'option' => 'text_shadow_horizontal_length', 'slug' => 'text_shadow', 'prop' => 'text-shadow', ),
[6982] Fix | Delete
array( 'option' => 'text_shadow_vertical_length', 'slug' => 'text_shadow', 'prop' => 'text-shadow', ),
[6983] Fix | Delete
array( 'option' => 'text_shadow_blur_strength', 'slug' => 'text_shadow', 'prop' => 'text-shadow', ),
[6984] Fix | Delete
array( 'option' => 'text_shadow_color', 'slug' => 'text_shadow', 'prop' => 'text-shadow', ),
[6985] Fix | Delete
array( 'option' => 'border_weight', 'slug' => 'quote', 'prop' => 'border-width', ),
[6986] Fix | Delete
array( 'option' => 'border_color', 'slug' => 'quote', 'prop' => 'border-color', ),
[6987] Fix | Delete
);
[6988] Fix | Delete
$fields = array();
[6989] Fix | Delete
[6990] Fix | Delete
foreach ( $items as $item => $field ) {
[6991] Fix | Delete
foreach ( $font_options as $key ) {
[6992] Fix | Delete
$fields["{$item}_{$key['option']}"] = array(
[6993] Fix | Delete
$key['prop'] => self::$_->array_get(
[6994] Fix | Delete
$field,
[6995] Fix | Delete
"css.{$key['slug']}",
[6996] Fix | Delete
self::$_->array_get( $field, 'css.main', '%%order_class%%' )
[6997] Fix | Delete
)
[6998] Fix | Delete
);
[6999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function