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
/home/sportsfe.../httpdocs/clone/wp-conte.../themes/Divi/includes/builder/module
File: TabsItem.php
<?php
[0] Fix | Delete
[1] Fix | Delete
class ET_Builder_Module_Tabs_Item extends ET_Builder_Module {
[2] Fix | Delete
function init() {
[3] Fix | Delete
$this->name = esc_html__( 'Tab', 'et_builder' );
[4] Fix | Delete
$this->plural = esc_html__( 'Tabs', 'et_builder' );
[5] Fix | Delete
$this->slug = 'et_pb_tab';
[6] Fix | Delete
$this->vb_support = 'on';
[7] Fix | Delete
$this->type = 'child';
[8] Fix | Delete
$this->child_title_var = 'title';
[9] Fix | Delete
$this->advanced_setting_title_text = esc_html__( 'New Tab', 'et_builder' );
[10] Fix | Delete
$this->settings_text = esc_html__( 'Tab Settings', 'et_builder' );
[11] Fix | Delete
$this->main_css_element = '%%order_class%%';
[12] Fix | Delete
[13] Fix | Delete
$this->settings_modal_toggles = array(
[14] Fix | Delete
'general' => array(
[15] Fix | Delete
'toggles' => array(
[16] Fix | Delete
'main_content' => et_builder_i18n( 'Text' ),
[17] Fix | Delete
),
[18] Fix | Delete
),
[19] Fix | Delete
);
[20] Fix | Delete
[21] Fix | Delete
$this->advanced_fields = array(
[22] Fix | Delete
'fonts' => array(
[23] Fix | Delete
'body' => array(
[24] Fix | Delete
'label' => et_builder_i18n( 'Body' ),
[25] Fix | Delete
'css' => array(
[26] Fix | Delete
'main' => ".et_pb_tabs .et_pb_all_tabs {$this->main_css_element}.et_pb_tab",
[27] Fix | Delete
'line_height' => ".et_pb_tabs {$this->main_css_element}.et_pb_tab p",
[28] Fix | Delete
'limited_main' => ".et_pb_tabs .et_pb_all_tabs {$this->main_css_element}.et_pb_tab, .et_pb_tabs .et_pb_all_tabs {$this->main_css_element}.et_pb_tab p",
[29] Fix | Delete
),
[30] Fix | Delete
'line_height' => array(
[31] Fix | Delete
'range_settings' => array(
[32] Fix | Delete
'min' => '1',
[33] Fix | Delete
'max' => '100',
[34] Fix | Delete
'step' => '1',
[35] Fix | Delete
),
[36] Fix | Delete
),
[37] Fix | Delete
'block_elements' => array(
[38] Fix | Delete
'tabbed_subtoggles' => true,
[39] Fix | Delete
'bb_icons_support' => true,
[40] Fix | Delete
),
[41] Fix | Delete
),
[42] Fix | Delete
'tab' => array(
[43] Fix | Delete
'label' => esc_html__( 'Tab', 'et_builder' ),
[44] Fix | Delete
'css' => array(
[45] Fix | Delete
'main' => ".et_pb_tabs .et_pb_tabs_controls li{$this->main_css_element}, .et_pb_tabs .et_pb_tabs_controls li{$this->main_css_element} a",
[46] Fix | Delete
'color' => ".et_pb_tabs .et_pb_tabs_controls li{$this->main_css_element} a",
[47] Fix | Delete
'important' => 'all',
[48] Fix | Delete
),
[49] Fix | Delete
'line_height' => array(
[50] Fix | Delete
'range_settings' => array(
[51] Fix | Delete
'min' => '1',
[52] Fix | Delete
'max' => '100',
[53] Fix | Delete
'step' => '1',
[54] Fix | Delete
),
[55] Fix | Delete
),
[56] Fix | Delete
'hide_text_align' => true,
[57] Fix | Delete
),
[58] Fix | Delete
),
[59] Fix | Delete
'background' => array(
[60] Fix | Delete
'css' => array(
[61] Fix | Delete
'main' => ".et_pb_tabs {$this->main_css_element}.et_pb_tab",
[62] Fix | Delete
),
[63] Fix | Delete
'settings' => array(
[64] Fix | Delete
'color' => 'alpha',
[65] Fix | Delete
),
[66] Fix | Delete
),
[67] Fix | Delete
'borders' => array(
[68] Fix | Delete
'default' => false,
[69] Fix | Delete
),
[70] Fix | Delete
'margin_padding' => array(
[71] Fix | Delete
'use_margin' => false,
[72] Fix | Delete
'css' => array(
[73] Fix | Delete
'padding' => '.et_pb_tabs .et_pb_tab%%order_class%%',
[74] Fix | Delete
),
[75] Fix | Delete
),
[76] Fix | Delete
'box_shadow' => array(
[77] Fix | Delete
'default' => false,
[78] Fix | Delete
),
[79] Fix | Delete
'text' => false,
[80] Fix | Delete
'max_width' => false,
[81] Fix | Delete
'height' => false,
[82] Fix | Delete
'button' => false,
[83] Fix | Delete
'scroll_effects' => false,
[84] Fix | Delete
);
[85] Fix | Delete
[86] Fix | Delete
$this->custom_css_fields = array(
[87] Fix | Delete
'main_element' => array(
[88] Fix | Delete
'label' => et_builder_i18n( 'Main Element' ),
[89] Fix | Delete
'selector' => ".et_pb_tabs div{$this->main_css_element}.et_pb_tab",
[90] Fix | Delete
)
[91] Fix | Delete
);
[92] Fix | Delete
}
[93] Fix | Delete
[94] Fix | Delete
function get_fields() {
[95] Fix | Delete
$fields = array(
[96] Fix | Delete
'title' => array(
[97] Fix | Delete
'label' => et_builder_i18n( 'Title' ),
[98] Fix | Delete
'type' => 'text',
[99] Fix | Delete
'description' => esc_html__( 'The title will be used within the tab button for this tab.', 'et_builder' ),
[100] Fix | Delete
'toggle_slug' => 'main_content',
[101] Fix | Delete
'dynamic_content' => 'text',
[102] Fix | Delete
'option_category' => 'basic_option',
[103] Fix | Delete
'mobile_options' => true,
[104] Fix | Delete
'hover' => 'tabs',
[105] Fix | Delete
),
[106] Fix | Delete
'content' => array(
[107] Fix | Delete
'label' => et_builder_i18n( 'Body' ),
[108] Fix | Delete
'type' => 'tiny_mce',
[109] Fix | Delete
'description' => esc_html__( 'Here you can define the content that will be placed within the current tab.', 'et_builder' ),
[110] Fix | Delete
'toggle_slug' => 'main_content',
[111] Fix | Delete
'dynamic_content' => 'text',
[112] Fix | Delete
'option_category' => 'basic_option',
[113] Fix | Delete
'mobile_options' => true,
[114] Fix | Delete
'hover' => 'tabs',
[115] Fix | Delete
),
[116] Fix | Delete
);
[117] Fix | Delete
return $fields;
[118] Fix | Delete
}
[119] Fix | Delete
[120] Fix | Delete
/**
[121] Fix | Delete
* Set the `product` prop on TabItem.
[122] Fix | Delete
*
[123] Fix | Delete
* `product` prop is only available w/ the Parents' Tab module and not w/ TabsItem module.
[124] Fix | Delete
*
[125] Fix | Delete
* The global $et_pb_wc_tabs variable is set
[126] Fix | Delete
*/
[127] Fix | Delete
function maybe_inherit_values() {
[128] Fix | Delete
// Inheriting Tabs attribute.
[129] Fix | Delete
global $et_pb_wc_tabs;
[130] Fix | Delete
[131] Fix | Delete
if ( isset( $et_pb_wc_tabs ) && ! empty( $et_pb_wc_tabs['product'] ) ) {
[132] Fix | Delete
$this->props['product'] = $et_pb_wc_tabs['product'];
[133] Fix | Delete
}
[134] Fix | Delete
[135] Fix | Delete
}
[136] Fix | Delete
[137] Fix | Delete
/**
[138] Fix | Delete
* Return the Product ID when set. Otherwise return parent::get_the_ID()
[139] Fix | Delete
*
[140] Fix | Delete
* $this->props['product'] is set using
[141] Fix | Delete
* @see ET_Builder_Module_Tabs_Item->maybe_inherit_values()
[142] Fix | Delete
*
[143] Fix | Delete
* @return bool|int
[144] Fix | Delete
*/
[145] Fix | Delete
function get_the_ID() {
[146] Fix | Delete
if ( ! isset( $this->props['product'] ) ) {
[147] Fix | Delete
return parent::get_the_ID();
[148] Fix | Delete
}
[149] Fix | Delete
[150] Fix | Delete
$product = wc_get_product( absint( $this->props['product'] ) );
[151] Fix | Delete
if ( $product instanceof WC_Product ) {
[152] Fix | Delete
return $product->get_id();
[153] Fix | Delete
}
[154] Fix | Delete
}
[155] Fix | Delete
[156] Fix | Delete
function render( $attrs, $content = null, $render_slug ) {
[157] Fix | Delete
global $et_pb_tab_titles;
[158] Fix | Delete
global $et_pb_tab_classes;
[159] Fix | Delete
[160] Fix | Delete
$multi_view = et_pb_multi_view_options( $this );
[161] Fix | Delete
[162] Fix | Delete
$video_background = $this->video_background();
[163] Fix | Delete
$parallax_image_background = $this->get_parallax_image_background();
[164] Fix | Delete
[165] Fix | Delete
$i = 0;
[166] Fix | Delete
[167] Fix | Delete
$multi_view->set_default_value( 'title', esc_html__( 'Tab', 'et_builder' ) );
[168] Fix | Delete
[169] Fix | Delete
$et_pb_tab_titles[] = $multi_view->get_values( 'title' );
[170] Fix | Delete
$et_pb_tab_classes[] = ET_Builder_Element::get_module_order_class( $render_slug );
[171] Fix | Delete
[172] Fix | Delete
// Module classnames
[173] Fix | Delete
$this->add_classname( array(
[174] Fix | Delete
'clearfix',
[175] Fix | Delete
$this->get_text_orientation_classname(),
[176] Fix | Delete
) );
[177] Fix | Delete
[178] Fix | Delete
if ( 1 === count( $et_pb_tab_titles ) ) {
[179] Fix | Delete
$this->add_classname( 'et_pb_active_content' );
[180] Fix | Delete
}
[181] Fix | Delete
[182] Fix | Delete
// Remove automatically added classnames
[183] Fix | Delete
$this->remove_classname( array(
[184] Fix | Delete
'et_pb_module',
[185] Fix | Delete
) );
[186] Fix | Delete
[187] Fix | Delete
$content = $multi_view->render_element( array(
[188] Fix | Delete
'tag' => 'div',
[189] Fix | Delete
'content' => '{{content}}',
[190] Fix | Delete
'attrs' => array(
[191] Fix | Delete
'class' => 'et_pb_tab_content',
[192] Fix | Delete
),
[193] Fix | Delete
) );
[194] Fix | Delete
[195] Fix | Delete
$output = sprintf(
[196] Fix | Delete
'<div class="%2$s">
[197] Fix | Delete
%4$s
[198] Fix | Delete
%3$s
[199] Fix | Delete
%1$s
[200] Fix | Delete
</div> <!-- .et_pb_tab -->',
[201] Fix | Delete
$content,
[202] Fix | Delete
$this->module_classname( $render_slug ),
[203] Fix | Delete
$video_background,
[204] Fix | Delete
$parallax_image_background
[205] Fix | Delete
);
[206] Fix | Delete
[207] Fix | Delete
return $output;
[208] Fix | Delete
}
[209] Fix | Delete
}
[210] Fix | Delete
[211] Fix | Delete
new ET_Builder_Module_Tabs_Item;
[212] Fix | Delete
[213] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function