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
$existing_text_settings['fields_default_on_child'] = true;
[3500] Fix | Delete
$block_elements_default_settings['fields_default_on_child'] = true;
[3501] Fix | Delete
}
[3502] Fix | Delete
[3503] Fix | Delete
// a. Paragraph - Convert main text as sub toggle P.
[3504] Fix | Delete
// Convert font settings with block_elements property to be sub toggle of P as
[3505] Fix | Delete
// default. So, we can avoid migration because no settings changed after we added
[3506] Fix | Delete
// block elements. We also need to set default line_height and font_size.
[3507] Fix | Delete
$advanced_font_options[ $option_name ] = array_merge( $existing_text_settings, array(
[3508] Fix | Delete
'line_height' => array(
[3509] Fix | Delete
'default' => floatval( et_get_option( 'body_font_height', '1.7' ) ) . 'em',
[3510] Fix | Delete
),
[3511] Fix | Delete
'font_size' => array(
[3512] Fix | Delete
'default' => absint( et_get_option( 'body_font_size', '14' ) ) . 'px',
[3513] Fix | Delete
),
[3514] Fix | Delete
'sub_toggle' => 'p',
[3515] Fix | Delete
) );
[3516] Fix | Delete
[3517] Fix | Delete
// b. Link.
[3518] Fix | Delete
$link_element_selector = isset( $block_elements_css['link'] ) ? $block_elements_css['link'] : "{$block_elements_selector} a";
[3519] Fix | Delete
$advanced_font_options["{$option_name}_link"] = array_merge( $block_elements_default_settings, array(
[3520] Fix | Delete
'label' => et_builder_i18n( 'Link' ),
[3521] Fix | Delete
'css' => array(
[3522] Fix | Delete
'main' => $link_element_selector,
[3523] Fix | Delete
),
[3524] Fix | Delete
'font_size' => array(
[3525] Fix | Delete
'default' => absint( et_get_option( 'body_font_size', '14' ) ) . 'px',
[3526] Fix | Delete
),
[3527] Fix | Delete
'sub_toggle' => 'a',
[3528] Fix | Delete
) );
[3529] Fix | Delete
[3530] Fix | Delete
// c. Unordered List.
[3531] Fix | Delete
$ul_element_selector = et_()->array_get( $block_elements_css, 'ul', "{$block_elements_selector} ul" );
[3532] Fix | Delete
$ul_li_element_selector = et_()->array_get( $block_elements_css, 'ul_li', "{$ul_element_selector} li" );
[3533] Fix | Delete
$ul_item_indent_selector = et_()->array_get( $block_elements_css, 'ul_item_indent', $ul_element_selector );
[3534] Fix | Delete
$advanced_font_options["{$option_name}_ul"] = array_merge( $block_elements_default_settings, array(
[3535] Fix | Delete
'label' => esc_html__( 'Unordered List', 'et_builder' ),
[3536] Fix | Delete
'css' => array(
[3537] Fix | Delete
'main' => $ul_li_element_selector,
[3538] Fix | Delete
'item_indent' => $ul_item_indent_selector,
[3539] Fix | Delete
),
[3540] Fix | Delete
'sub_toggle' => 'ul',
[3541] Fix | Delete
) );
[3542] Fix | Delete
[3543] Fix | Delete
// d. Ordered List.
[3544] Fix | Delete
$ol_element_selector = et_()->array_get( $block_elements_css, 'ol', "{$block_elements_selector} ol" );
[3545] Fix | Delete
$ol_li_element_selector = et_()->array_get( $block_elements_css, 'ol_li', "{$ol_element_selector} li" );
[3546] Fix | Delete
$ol_item_indent_selector = et_()->array_get( $block_elements_css, 'ol_item_indent', $ol_element_selector );
[3547] Fix | Delete
$advanced_font_options["{$option_name}_ol"] = array_merge( $block_elements_default_settings, array(
[3548] Fix | Delete
'label' => esc_html__( 'Ordered List', 'et_builder' ),
[3549] Fix | Delete
'css' => array(
[3550] Fix | Delete
'main' => $ol_li_element_selector,
[3551] Fix | Delete
'item_indent' => $ol_item_indent_selector,
[3552] Fix | Delete
),
[3553] Fix | Delete
'sub_toggle' => 'ol',
[3554] Fix | Delete
) );
[3555] Fix | Delete
[3556] Fix | Delete
// e. Quote.
[3557] Fix | Delete
$quote_element_selector = isset( $block_elements_css['quote'] ) ? $block_elements_css['quote'] : "{$block_elements_selector} blockquote";
[3558] Fix | Delete
$advanced_font_options["{$option_name}_quote"] = array_merge( $block_elements_default_settings, array(
[3559] Fix | Delete
'label' => esc_html__( 'Blockquote', 'et_builder' ),
[3560] Fix | Delete
'css' => array(
[3561] Fix | Delete
'main' => $quote_element_selector,
[3562] Fix | Delete
),
[3563] Fix | Delete
'sub_toggle' => 'quote',
[3564] Fix | Delete
) );
[3565] Fix | Delete
}
[3566] Fix | Delete
}
[3567] Fix | Delete
[3568] Fix | Delete
$this->advanced_fields['fonts'] = $advanced_font_options;
[3569] Fix | Delete
$font_options_count = 0;
[3570] Fix | Delete
[3571] Fix | Delete
foreach ( $advanced_font_options as $option_name => $option_settings ) {
[3572] Fix | Delete
$font_options_count++;
[3573] Fix | Delete
[3574] Fix | Delete
$option_settings = wp_parse_args( $option_settings, array(
[3575] Fix | Delete
'label' => '',
[3576] Fix | Delete
'font_size' => array(),
[3577] Fix | Delete
'letter_spacing' => array(),
[3578] Fix | Delete
'font' => array(),
[3579] Fix | Delete
'text_align' => array(),
[3580] Fix | Delete
) );
[3581] Fix | Delete
[3582] Fix | Delete
$toggle_disabled = isset( $option_settings['disable_toggle'] ) && $option_settings['disable_toggle'];
[3583] Fix | Delete
$tab_slug = isset( $option_settings['tab_slug'] ) ? $option_settings['tab_slug'] : 'advanced';
[3584] Fix | Delete
$toggle_slug = '';
[3585] Fix | Delete
[3586] Fix | Delete
if ( ! $toggle_disabled ) {
[3587] Fix | Delete
$toggle_slug = isset( $option_settings['toggle_slug'] ) ? $option_settings['toggle_slug'] : $option_name;
[3588] Fix | Delete
$sub_toggle = isset( $option_settings['sub_toggle'] ) ? $option_settings['sub_toggle'] : '';
[3589] Fix | Delete
[3590] Fix | Delete
if ( ! isset( $option_settings['toggle_slug'] ) ) {
[3591] Fix | Delete
$font_toggle = array(
[3592] Fix | Delete
$option_name => array(
[3593] Fix | Delete
'title' => sprintf( '%1$s %2$s', esc_html( $option_settings['label'] ), et_builder_i18n( 'Text' ) ),
[3594] Fix | Delete
'priority' => 50 + $font_options_count,
[3595] Fix | Delete
),
[3596] Fix | Delete
);
[3597] Fix | Delete
[3598] Fix | Delete
$this->_add_settings_modal_toggles( $tab_slug, $font_toggle );
[3599] Fix | Delete
}
[3600] Fix | Delete
}
[3601] Fix | Delete
[3602] Fix | Delete
if ( isset( $option_settings['header_level'] ) ) {
[3603] Fix | Delete
$additional_options["{$option_name}_level"] = array(
[3604] Fix | Delete
'label' => sprintf( esc_html__( '%1$s Heading Level', 'et_builder' ), $option_settings['label'] ),
[3605] Fix | Delete
'description' => sprintf( esc_html__( 'Module %1$s are created using HTML headings. You can change the heading level for this module by choosing anything from H1 through H6. Higher heading levels are smaller and less significant.', 'et_builder' ), $option_settings['label'] ),
[3606] Fix | Delete
'type' => 'multiple_buttons',
[3607] Fix | Delete
'option_category' => 'font_option',
[3608] Fix | Delete
'options' => array(
[3609] Fix | Delete
'h1' => array( 'title' => 'H1', 'icon' => 'text-h1', ),
[3610] Fix | Delete
'h2' => array( 'title' => 'H2', 'icon' => 'text-h2', ),
[3611] Fix | Delete
'h3' => array( 'title' => 'H3', 'icon' => 'text-h3', ),
[3612] Fix | Delete
'h4' => array( 'title' => 'H4', 'icon' => 'text-h4', ),
[3613] Fix | Delete
'h5' => array( 'title' => 'H5', 'icon' => 'text-h5', ),
[3614] Fix | Delete
'h6' => array( 'title' => 'H6', 'icon' => 'text-h6', ),
[3615] Fix | Delete
),
[3616] Fix | Delete
'default' => isset( $option_settings['header_level']['default'] ) ? $option_settings['header_level']['default'] : 'h2',
[3617] Fix | Delete
'tab_slug' => $tab_slug,
[3618] Fix | Delete
'toggle_slug' => $toggle_slug,
[3619] Fix | Delete
'sub_toggle' => $sub_toggle,
[3620] Fix | Delete
'advanced_fields' => true,
[3621] Fix | Delete
);
[3622] Fix | Delete
[3623] Fix | Delete
if ( isset( $option_settings['header_level']['computed_affects'] ) ) {
[3624] Fix | Delete
$additional_options["{$option_name}_level"]['computed_affects'] = $option_settings['header_level']['computed_affects'];
[3625] Fix | Delete
}
[3626] Fix | Delete
}
[3627] Fix | Delete
[3628] Fix | Delete
if ( ! isset( $option_settings['hide_font'] ) || ! $option_settings['hide_font'] ) {
[3629] Fix | Delete
$additional_options["{$option_name}_font"] = wp_parse_args( $option_settings['font'], array(
[3630] Fix | Delete
'label' => sprintf( $i18n['font']['font']['label'], $option_settings['label'] ),
[3631] Fix | Delete
'description' => sprintf( $i18n['font']['font']['description'], $option_settings['label'] ),
[3632] Fix | Delete
'type' => 'font',
[3633] Fix | Delete
'group_label' => et_core_esc_previously( $option_settings['label'] ),
[3634] Fix | Delete
'option_category' => 'font_option',
[3635] Fix | Delete
'tab_slug' => $tab_slug,
[3636] Fix | Delete
'toggle_slug' => $toggle_slug,
[3637] Fix | Delete
'sub_toggle' => $sub_toggle,
[3638] Fix | Delete
'mobile_options' => true,
[3639] Fix | Delete
) );
[3640] Fix | Delete
[3641] Fix | Delete
// add reference to the obsolete "all caps" option if needed
[3642] Fix | Delete
if ( isset( $option_settings['use_all_caps'] ) && $option_settings['use_all_caps'] ) {
[3643] Fix | Delete
$additional_options["{$option_name}_font"]['attributes'] = array( 'data-old-option-ref' => "{$option_name}_all_caps" );
[3644] Fix | Delete
}
[3645] Fix | Delete
[3646] Fix | Delete
// set the depends_show_if parameter if needed
[3647] Fix | Delete
if ( isset( $option_settings['depends_show_if'] ) ) {
[3648] Fix | Delete
$additional_options["{$option_name}_font"]['depends_show_if'] = $option_settings['depends_show_if'];
[3649] Fix | Delete
}
[3650] Fix | Delete
[3651] Fix | Delete
// Set default font settings.
[3652] Fix | Delete
if ( ! empty( $option_settings['font']['default'] ) ) {
[3653] Fix | Delete
$additional_options["{$option_name}_font"]['default'] = $option_settings['font']['default'];
[3654] Fix | Delete
}
[3655] Fix | Delete
[3656] Fix | Delete
// Set default on child font settings.
[3657] Fix | Delete
if ( ! empty( $option_settings['fields_default_on_child'] ) ) {
[3658] Fix | Delete
$additional_options["{$option_name}_font"]['default_on_child'] = true;
[3659] Fix | Delete
}
[3660] Fix | Delete
}
[3661] Fix | Delete
[3662] Fix | Delete
if ( ! isset( $option_settings['hide_text_align'] ) || ! $option_settings['hide_text_align'] ) {
[3663] Fix | Delete
$additional_options["{$option_name}_text_align"] = wp_parse_args( $option_settings['text_align'], array(
[3664] Fix | Delete
'label' => sprintf( $i18n['font']['text_align']['label'], $option_settings['label'] ),
[3665] Fix | Delete
'description' => sprintf( $i18n['font']['text_align']['description'], $option_settings['label'] ),
[3666] Fix | Delete
'type' => 'text_align',
[3667] Fix | Delete
'option_category' => 'layout',
[3668] Fix | Delete
'options' => et_builder_get_text_orientation_options( array( 'justified' ), array( 'justify' => 'Justified' ) ),
[3669] Fix | Delete
'tab_slug' => $tab_slug,
[3670] Fix | Delete
'toggle_slug' => $toggle_slug,
[3671] Fix | Delete
'sub_toggle' => $sub_toggle,
[3672] Fix | Delete
'advanced_fields' => true,
[3673] Fix | Delete
'mobile_options' => true,
[3674] Fix | Delete
) );
[3675] Fix | Delete
[3676] Fix | Delete
// Set default on child font settings.
[3677] Fix | Delete
if ( ! empty( $option_settings['fields_default_on_child'] ) ) {
[3678] Fix | Delete
$additional_options["{$option_name}_text_align"]['default_on_child'] = true;
[3679] Fix | Delete
}
[3680] Fix | Delete
}
[3681] Fix | Delete
[3682] Fix | Delete
if ( ! isset( $option_settings['hide_text_color'] ) || ! $option_settings['hide_text_color'] ) {
[3683] Fix | Delete
$label = et_()->array_get( $option_settings, 'text_color.label', false )
[3684] Fix | Delete
? $option_settings['text_color']['label']
[3685] Fix | Delete
: sprintf( $i18n['font']['color']['label'], $option_settings['label'] );
[3686] Fix | Delete
[3687] Fix | Delete
$additional_options["{$option_name}_text_color"] = array(
[3688] Fix | Delete
'label' => $label,
[3689] Fix | Delete
'description' => sprintf( $i18n['font']['color']['description'], $option_settings['label'] ),
[3690] Fix | Delete
'type' => 'color-alpha',
[3691] Fix | Delete
'option_category' => 'font_option',
[3692] Fix | Delete
'custom_color' => true,
[3693] Fix | Delete
'tab_slug' => $tab_slug,
[3694] Fix | Delete
'toggle_slug' => $toggle_slug,
[3695] Fix | Delete
'sub_toggle' => $sub_toggle,
[3696] Fix | Delete
'hover' => 'tabs',
[3697] Fix | Delete
'mobile_options' => true,
[3698] Fix | Delete
);
[3699] Fix | Delete
[3700] Fix | Delete
// add reference to the obsolete color option if needed
[3701] Fix | Delete
if ( self::$_->array_get( $option_settings, 'text_color.old_option_ref' ) ) {
[3702] Fix | Delete
$additional_options["{$option_name}_text_color"]['attributes'] = array( 'data-old-option-ref' => "{$option_settings['text_color']['old_option_ref']}" );
[3703] Fix | Delete
}
[3704] Fix | Delete
[3705] Fix | Delete
// set default value if defined
[3706] Fix | Delete
if ( self::$_->array_get( $option_settings, 'text_color.default' ) ) {
[3707] Fix | Delete
$additional_options["{$option_name}_text_color"]['default'] = $option_settings['text_color']['default'];
[3708] Fix | Delete
}
[3709] Fix | Delete
[3710] Fix | Delete
// set the depends_show_if parameter if needed
[3711] Fix | Delete
if ( isset( $option_settings['depends_show_if'] ) ) {
[3712] Fix | Delete
$additional_options["{$option_name}_text_color"]['depends_show_if'] = $option_settings['depends_show_if'];
[3713] Fix | Delete
}
[3714] Fix | Delete
[3715] Fix | Delete
// Set default on child font settings.
[3716] Fix | Delete
if ( ! empty( $option_settings['fields_default_on_child'] ) ) {
[3717] Fix | Delete
$additional_options["{$option_name}_text_color"]['default_on_child'] = true;
[3718] Fix | Delete
}
[3719] Fix | Delete
}
[3720] Fix | Delete
[3721] Fix | Delete
if ( ! isset( $option_settings['hide_font_size'] ) || ! $option_settings['hide_font_size'] ) {
[3722] Fix | Delete
$additional_options["{$option_name}_font_size"] = wp_parse_args( $option_settings['font_size'], array(
[3723] Fix | Delete
'label' => sprintf( $i18n['font']['size']['label'], $option_settings['label'] ),
[3724] Fix | Delete
'description' => sprintf( $i18n['font']['size']['description'], $option_settings['label'] ),
[3725] Fix | Delete
'type' => 'range',
[3726] Fix | Delete
'option_category' => 'font_option',
[3727] Fix | Delete
'tab_slug' => $tab_slug,
[3728] Fix | Delete
'toggle_slug' => $toggle_slug,
[3729] Fix | Delete
'sub_toggle' => $sub_toggle,
[3730] Fix | Delete
'allowed_units' => array( '%', 'em', 'rem', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ex', 'vh', 'vw' ),
[3731] Fix | Delete
'default_unit' => 'px',
[3732] Fix | Delete
'mobile_options' => true,
[3733] Fix | Delete
'range_settings' => array(
[3734] Fix | Delete
'min' => '1',
[3735] Fix | Delete
'max' => '100',
[3736] Fix | Delete
'step' => '1',
[3737] Fix | Delete
),
[3738] Fix | Delete
'hover' => 'tabs',
[3739] Fix | Delete
) );
[3740] Fix | Delete
[3741] Fix | Delete
// set the depends_show_if parameter if needed
[3742] Fix | Delete
if ( isset( $option_settings['depends_show_if'] ) ) {
[3743] Fix | Delete
$additional_options["{$option_name}_font_size"]['depends_show_if'] = $option_settings['depends_show_if'];
[3744] Fix | Delete
}
[3745] Fix | Delete
[3746] Fix | Delete
if ( isset( $option_settings['header_level'] ) ) {
[3747] Fix | Delete
$header_level_default = isset( $option_settings['header_level']['default'] ) ? $option_settings['header_level']['default'] : 'h2';
[3748] Fix | Delete
[3749] Fix | Delete
$additional_options["{$option_name}_font_size"]['default_value_depends'] = "{$option_name}_level";
[3750] Fix | Delete
$additional_options["{$option_name}_font_size"]['default_values_mapping'] = array(
[3751] Fix | Delete
'h1' => '30px',
[3752] Fix | Delete
'h2' => '26px',
[3753] Fix | Delete
'h3' => '22px',
[3754] Fix | Delete
'h4' => '18px',
[3755] Fix | Delete
'h5' => '16px',
[3756] Fix | Delete
'h6' => '14px',
[3757] Fix | Delete
);
[3758] Fix | Delete
[3759] Fix | Delete
// remove default font-size for default header level to use option default
[3760] Fix | Delete
unset( $additional_options["{$option_name}_font_size"]['default_values_mapping'][ $header_level_default ] );
[3761] Fix | Delete
}
[3762] Fix | Delete
[3763] Fix | Delete
// Set default on child font settings.
[3764] Fix | Delete
if ( ! empty( $option_settings['fields_default_on_child'] ) ) {
[3765] Fix | Delete
$additional_options["{$option_name}_font_size"]['default_on_child'] = true;
[3766] Fix | Delete
}
[3767] Fix | Delete
}
[3768] Fix | Delete
[3769] Fix | Delete
if ( ! isset( $option_settings['hide_letter_spacing'] ) || ! $option_settings['hide_letter_spacing'] ) {
[3770] Fix | Delete
$additional_options["{$option_name}_letter_spacing"] = wp_parse_args( $option_settings['letter_spacing'], array(
[3771] Fix | Delete
'label' => sprintf( $i18n['font']['letter_spacing']['label'], $option_settings['label'] ),
[3772] Fix | Delete
'description' => sprintf( $i18n['font']['letter_spacing']['description'], $option_settings['label'] ),
[3773] Fix | Delete
'type' => 'range',
[3774] Fix | Delete
'mobile_options' => true,
[3775] Fix | Delete
'option_category' => 'font_option',
[3776] Fix | Delete
'tab_slug' => $tab_slug,
[3777] Fix | Delete
'toggle_slug' => $toggle_slug,
[3778] Fix | Delete
'sub_toggle' => $sub_toggle,
[3779] Fix | Delete
'default' => '0px',
[3780] Fix | Delete
'default_unit' => 'px',
[3781] Fix | Delete
'allowed_units' => array( 'em', 'rem', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ex', 'vh', 'vw' ),
[3782] Fix | Delete
'range_settings' => array(
[3783] Fix | Delete
'min' => '0',
[3784] Fix | Delete
'max' => '100',
[3785] Fix | Delete
'step' => '1',
[3786] Fix | Delete
),
[3787] Fix | Delete
'hover' => 'tabs',
[3788] Fix | Delete
) );
[3789] Fix | Delete
[3790] Fix | Delete
// set the depends_show_if parameter if needed
[3791] Fix | Delete
if ( isset( $option_settings['depends_show_if'] ) ) {
[3792] Fix | Delete
$additional_options["{$option_name}_letter_spacing"]['depends_show_if'] = $option_settings['depends_show_if'];
[3793] Fix | Delete
}
[3794] Fix | Delete
[3795] Fix | Delete
// Set default on child font settings.
[3796] Fix | Delete
if ( ! empty( $option_settings['fields_default_on_child'] ) ) {
[3797] Fix | Delete
$additional_options["{$option_name}_letter_spacing"]['default_on_child'] = true;
[3798] Fix | Delete
}
[3799] Fix | Delete
}
[3800] Fix | Delete
[3801] Fix | Delete
if ( ! isset( $option_settings['hide_line_height'] ) || ! $option_settings['hide_line_height'] ) {
[3802] Fix | Delete
$default_option_line_height = array(
[3803] Fix | Delete
'label' => sprintf( $i18n['font']['line_height']['label'], $option_settings['label'] ),
[3804] Fix | Delete
'description' => sprintf( $i18n['font']['line_height']['description'], $option_settings['label'] ),
[3805] Fix | Delete
'type' => 'range',
[3806] Fix | Delete
'mobile_options' => true,
[3807] Fix | Delete
'option_category' => 'font_option',
[3808] Fix | Delete
'tab_slug' => $tab_slug,
[3809] Fix | Delete
'toggle_slug' => $toggle_slug,
[3810] Fix | Delete
'sub_toggle' => $sub_toggle,
[3811] Fix | Delete
'default_unit' => 'em',
[3812] Fix | Delete
'allowed_units' => array( '%', 'em', 'rem', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ex', 'vh', 'vw' ),
[3813] Fix | Delete
'range_settings' => array(
[3814] Fix | Delete
'min' => '1',
[3815] Fix | Delete
'max' => '3',
[3816] Fix | Delete
'step' => '0.1',
[3817] Fix | Delete
),
[3818] Fix | Delete
'hover' => 'tabs',
[3819] Fix | Delete
);
[3820] Fix | Delete
[3821] Fix | Delete
if ( isset( $option_settings['line_height'] ) ) {
[3822] Fix | Delete
$additional_options["{$option_name}_line_height"] = wp_parse_args(
[3823] Fix | Delete
$option_settings['line_height'],
[3824] Fix | Delete
$default_option_line_height
[3825] Fix | Delete
);
[3826] Fix | Delete
} else {
[3827] Fix | Delete
$additional_options["{$option_name}_line_height"] = $default_option_line_height;
[3828] Fix | Delete
}
[3829] Fix | Delete
[3830] Fix | Delete
// set the depends_show_if parameter if needed
[3831] Fix | Delete
if ( isset( $option_settings['depends_show_if'] ) ) {
[3832] Fix | Delete
$additional_options["{$option_name}_line_height"]['depends_show_if'] = $option_settings['depends_show_if'];
[3833] Fix | Delete
}
[3834] Fix | Delete
[3835] Fix | Delete
// Set default on child font settings.
[3836] Fix | Delete
if ( ! empty( $option_settings['fields_default_on_child'] ) ) {
[3837] Fix | Delete
$additional_options["{$option_name}_line_height"]['default_on_child'] = true;
[3838] Fix | Delete
}
[3839] Fix | Delete
}
[3840] Fix | Delete
[3841] Fix | Delete
// Add text-shadow to font options
[3842] Fix | Delete
if ( ! isset( $option_settings['hide_text_shadow'] ) || ! $option_settings['hide_text_shadow'] ) {
[3843] Fix | Delete
$option = $this->text_shadow->get_fields(array(
[3844] Fix | Delete
// Don't use an additional label for 'text' or else we'll end up with 'Text Text Shadow....'
[3845] Fix | Delete
'label' => 'text' === $option_name ? '' : $option_settings['label'],
[3846] Fix | Delete
'prefix' => $option_name,
[3847] Fix | Delete
'option_category' => 'font_option',
[3848] Fix | Delete
'tab_slug' => $tab_slug,
[3849] Fix | Delete
'toggle_slug' => $toggle_slug,
[3850] Fix | Delete
'sub_toggle' => $sub_toggle,
[3851] Fix | Delete
'mobile_options' => true,
[3852] Fix | Delete
));
[3853] Fix | Delete
$additional_options = array_merge( $additional_options, $option );
[3854] Fix | Delete
};
[3855] Fix | Delete
[3856] Fix | Delete
// The below option is obsolete. This code is for backward compatibility
[3857] Fix | Delete
if ( isset( $option_settings['use_all_caps'] ) && $option_settings['use_all_caps'] ) {
[3858] Fix | Delete
$additional_options["{$option_name}_all_caps"] = array(
[3859] Fix | Delete
'type' => 'hidden',
[3860] Fix | Delete
'tab_slug' => $tab_slug,
[3861] Fix | Delete
'toggle_slug' => $toggle_slug,
[3862] Fix | Delete
'sub_toggle' => $sub_toggle,
[3863] Fix | Delete
);
[3864] Fix | Delete
}
[3865] Fix | Delete
[3866] Fix | Delete
// Set options priority if it's exist and not empty. Mostly used to push a setting to
[3867] Fix | Delete
// the top of font settings. For example: reorder Text Color to the top of font settings.
[3868] Fix | Delete
if ( isset( $option_settings['options_priority'] ) && is_array( $option_settings['options_priority'] ) ) {
[3869] Fix | Delete
$options_priority = ! empty( $option_settings['options_priority'] ) ? $option_settings['options_priority'] : array();
[3870] Fix | Delete
$temporary_options = array();
[3871] Fix | Delete
foreach( $options_priority as $option_key => $option_priority ) {
[3872] Fix | Delete
// Ensure the target is exist before adding priority.
[3873] Fix | Delete
if ( isset( $additional_options[ $option_key ] ) ) {
[3874] Fix | Delete
$additional_options[ $option_key ]['priority'] = $option_priority;
[3875] Fix | Delete
[3876] Fix | Delete
// Keep it on temporary options and remove it from additional options.
[3877] Fix | Delete
// It's needed because priority doesn't work for font settings with no
[3878] Fix | Delete
// sub toggle. Basically, we will reorder the array element of font
[3879] Fix | Delete
// settings here to make it works.
[3880] Fix | Delete
$temporary_options[ $option_key ] = $additional_options[ $option_key ];
[3881] Fix | Delete
unset( $additional_options[ $option_key ] );
[3882] Fix | Delete
}
[3883] Fix | Delete
}
[3884] Fix | Delete
[3885] Fix | Delete
// Merge temporary options with additional options.
[3886] Fix | Delete
$additional_options = array_merge( $temporary_options, $additional_options );
[3887] Fix | Delete
}
[3888] Fix | Delete
[3889] Fix | Delete
if ( isset( $option_settings['block_elements'] ) && is_array( $option_settings['block_elements'] ) ) {
[3890] Fix | Delete
[3891] Fix | Delete
// Block Elements - 2. Set sub toggles for block elements.
[3892] Fix | Delete
// Add p, a, ul, ol, and quote as sub toggle of current font settings. We also
[3893] Fix | Delete
// need to add tabbed_subtoggles property there.
[3894] Fix | Delete
$block_elements = array(
[3895] Fix | Delete
'p' => array(
[3896] Fix | Delete
'name' => 'P',
[3897] Fix | Delete
'icon' => 'text-left',
[3898] Fix | Delete
),
[3899] Fix | Delete
'a' => array(
[3900] Fix | Delete
'name' => 'A',
[3901] Fix | Delete
'icon' => 'text-link',
[3902] Fix | Delete
),
[3903] Fix | Delete
'ul' => array(
[3904] Fix | Delete
'name' => 'UL',
[3905] Fix | Delete
'icon' => 'list',
[3906] Fix | Delete
),
[3907] Fix | Delete
'ol' => array(
[3908] Fix | Delete
'name' => 'OL',
[3909] Fix | Delete
'icon' => 'numbered-list',
[3910] Fix | Delete
),
[3911] Fix | Delete
'quote' => array(
[3912] Fix | Delete
'name' => 'QUOTE',
[3913] Fix | Delete
'icon' => 'text-quote',
[3914] Fix | Delete
),
[3915] Fix | Delete
);
[3916] Fix | Delete
[3917] Fix | Delete
// Tabbed toggle & BB icons support status.
[3918] Fix | Delete
$tabbed_subtoggles = isset( $option_settings['block_elements']['tabbed_subtoggles'] ) ? $option_settings['block_elements']['tabbed_subtoggles'] : false;
[3919] Fix | Delete
$bb_icons_support = isset( $option_settings['block_elements']['bb_icons_support'] ) ? $option_settings['block_elements']['bb_icons_support'] : false;
[3920] Fix | Delete
[3921] Fix | Delete
$this->_add_settings_modal_sub_toggles( $tab_slug, $toggle_slug, $block_elements, $tabbed_subtoggles, $bb_icons_support );
[3922] Fix | Delete
[3923] Fix | Delete
// Block Elements - 3. Set additional options for ul/ol/qoute sub toggles.
[3924] Fix | Delete
// a. UL - Type, Position, and Indent.
[3925] Fix | Delete
$additional_options["{$option_name}_ul_type"] = array(
[3926] Fix | Delete
'label' => esc_html__( 'Unordered List Style Type', 'et_builder' ),
[3927] Fix | Delete
'description' => esc_html__( 'This setting adjusts the shape of the bullet point that begins each list item.', 'et_builder' ),
[3928] Fix | Delete
'type' => 'select',
[3929] Fix | Delete
'option_category' => 'configuration',
[3930] Fix | Delete
'options' => array(
[3931] Fix | Delete
'disc' => et_builder_i18n( 'Disc' ),
[3932] Fix | Delete
'circle' => et_builder_i18n( 'Circle' ),
[3933] Fix | Delete
'square' => et_builder_i18n( 'Square' ),
[3934] Fix | Delete
'none' => et_builder_i18n( 'None' ),
[3935] Fix | Delete
),
[3936] Fix | Delete
'priority' => 80,
[3937] Fix | Delete
'default' => 'disc',
[3938] Fix | Delete
'default_on_front' => '',
[3939] Fix | Delete
'tab_slug' => 'advanced',
[3940] Fix | Delete
'toggle_slug' => $option_name,
[3941] Fix | Delete
'sub_toggle' => 'ul',
[3942] Fix | Delete
'mobile_options' => true,
[3943] Fix | Delete
);
[3944] Fix | Delete
$additional_options["{$option_name}_ul_position"] = array(
[3945] Fix | Delete
'label' => esc_html__( 'Unordered List Style Position', 'et_builder' ),
[3946] Fix | Delete
'description' => esc_html__( 'The bullet point that begins each list item can be placed either inside or outside the parent list wrapper. Placing list items inside will indent them further within the list.', 'et_builder' ),
[3947] Fix | Delete
'type' => 'select',
[3948] Fix | Delete
'option_category' => 'configuration',
[3949] Fix | Delete
'options' => array(
[3950] Fix | Delete
'outside' => et_builder_i18n( 'Outside' ),
[3951] Fix | Delete
'inside' => et_builder_i18n( 'Inside' ),
[3952] Fix | Delete
),
[3953] Fix | Delete
'priority' => 85,
[3954] Fix | Delete
'default' => 'outside',
[3955] Fix | Delete
'default_on_front' => '',
[3956] Fix | Delete
'tab_slug' => 'advanced',
[3957] Fix | Delete
'toggle_slug' => $option_name,
[3958] Fix | Delete
'sub_toggle' => 'ul',
[3959] Fix | Delete
'mobile_options' => true,
[3960] Fix | Delete
);
[3961] Fix | Delete
$additional_options["{$option_name}_ul_item_indent"] = array(
[3962] Fix | Delete
'label' => esc_html__( 'Unordered List Item Indent', 'et_builder' ),
[3963] Fix | Delete
'description' => esc_html__( 'Increasing indentation will push list items further towards the center of the text content, giving the list more visible separation from the the rest of the text.', 'et_builder' ),
[3964] Fix | Delete
'type' => 'range',
[3965] Fix | Delete
'option_category' => 'configuration',
[3966] Fix | Delete
'tab_slug' => 'advanced',
[3967] Fix | Delete
'toggle_slug' => $option_name,
[3968] Fix | Delete
'sub_toggle' => 'ul',
[3969] Fix | Delete
'priority' => 90,
[3970] Fix | Delete
'allowed_units' => array( '%', 'em', 'rem', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ex', 'vh', 'vw' ),
[3971] Fix | Delete
'default' => '0px',
[3972] Fix | Delete
'default_unit' => 'px',
[3973] Fix | Delete
'default_on_front' => '',
[3974] Fix | Delete
'range_settings' => array(
[3975] Fix | Delete
'min' => '0',
[3976] Fix | Delete
'max' => '100',
[3977] Fix | Delete
'step' => '1',
[3978] Fix | Delete
),
[3979] Fix | Delete
'mobile_options' => true,
[3980] Fix | Delete
);
[3981] Fix | Delete
// b. OL - Type, Position, and Indent.
[3982] Fix | Delete
$additional_options["{$option_name}_ol_type"] = array(
[3983] Fix | Delete
'label' => esc_html__( 'Ordered List Style Type', 'et_builder' ),
[3984] Fix | Delete
'description' => esc_html__( 'Here you can choose which types of characters are used to distinguish between each item in the ordered list.', 'et_builder' ),
[3985] Fix | Delete
'type' => 'select',
[3986] Fix | Delete
'option_category' => 'configuration',
[3987] Fix | Delete
'options' => array(
[3988] Fix | Delete
'decimal' => 'decimal',
[3989] Fix | Delete
'armenian' => 'armenian',
[3990] Fix | Delete
'cjk-ideographic' => 'cjk-ideographic',
[3991] Fix | Delete
'decimal-leading-zero' => 'decimal-leading-zero',
[3992] Fix | Delete
'georgian' => 'georgian',
[3993] Fix | Delete
'hebrew' => 'hebrew',
[3994] Fix | Delete
'hiragana' => 'hiragana',
[3995] Fix | Delete
'hiragana-iroha' => 'hiragana-iroha',
[3996] Fix | Delete
'katakana' => 'katakana',
[3997] Fix | Delete
'katakana-iroha' => 'katakana-iroha',
[3998] Fix | Delete
'lower-alpha' => 'lower-alpha',
[3999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function