: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
class ET_Builder_Module_Tabs_Item extends ET_Builder_Module {
$this->name = esc_html__( 'Tab', 'et_builder' );
$this->plural = esc_html__( 'Tabs', 'et_builder' );
$this->slug = 'et_pb_tab';
$this->vb_support = 'on';
$this->child_title_var = 'title';
$this->advanced_setting_title_text = esc_html__( 'New Tab', 'et_builder' );
$this->settings_text = esc_html__( 'Tab Settings', 'et_builder' );
$this->main_css_element = '%%order_class%%';
$this->settings_modal_toggles = array(
'main_content' => et_builder_i18n( 'Text' ),
$this->advanced_fields = array(
'label' => et_builder_i18n( 'Body' ),
'main' => ".et_pb_tabs .et_pb_all_tabs {$this->main_css_element}.et_pb_tab",
'line_height' => ".et_pb_tabs {$this->main_css_element}.et_pb_tab p",
'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",
'range_settings' => array(
'block_elements' => array(
'tabbed_subtoggles' => true,
'bb_icons_support' => true,
'label' => esc_html__( 'Tab', 'et_builder' ),
'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",
'color' => ".et_pb_tabs .et_pb_tabs_controls li{$this->main_css_element} a",
'range_settings' => array(
'hide_text_align' => true,
'main' => ".et_pb_tabs {$this->main_css_element}.et_pb_tab",
'margin_padding' => array(
'padding' => '.et_pb_tabs .et_pb_tab%%order_class%%',
'scroll_effects' => false,
$this->custom_css_fields = array(
'label' => et_builder_i18n( 'Main Element' ),
'selector' => ".et_pb_tabs div{$this->main_css_element}.et_pb_tab",
'label' => et_builder_i18n( 'Title' ),
'description' => esc_html__( 'The title will be used within the tab button for this tab.', 'et_builder' ),
'toggle_slug' => 'main_content',
'dynamic_content' => 'text',
'option_category' => 'basic_option',
'mobile_options' => true,
'label' => et_builder_i18n( 'Body' ),
'description' => esc_html__( 'Here you can define the content that will be placed within the current tab.', 'et_builder' ),
'toggle_slug' => 'main_content',
'dynamic_content' => 'text',
'option_category' => 'basic_option',
'mobile_options' => true,
* Set the `product` prop on TabItem.
* `product` prop is only available w/ the Parents' Tab module and not w/ TabsItem module.
* The global $et_pb_wc_tabs variable is set
function maybe_inherit_values() {
// Inheriting Tabs attribute.
if ( isset( $et_pb_wc_tabs ) && ! empty( $et_pb_wc_tabs['product'] ) ) {
$this->props['product'] = $et_pb_wc_tabs['product'];
* Return the Product ID when set. Otherwise return parent::get_the_ID()
* $this->props['product'] is set using
* @see ET_Builder_Module_Tabs_Item->maybe_inherit_values()
if ( ! isset( $this->props['product'] ) ) {
return parent::get_the_ID();
$product = wc_get_product( absint( $this->props['product'] ) );
if ( $product instanceof WC_Product ) {
return $product->get_id();
function render( $attrs, $content = null, $render_slug ) {
global $et_pb_tab_titles;
global $et_pb_tab_classes;
$multi_view = et_pb_multi_view_options( $this );
$video_background = $this->video_background();
$parallax_image_background = $this->get_parallax_image_background();
$multi_view->set_default_value( 'title', esc_html__( 'Tab', 'et_builder' ) );
$et_pb_tab_titles[] = $multi_view->get_values( 'title' );
$et_pb_tab_classes[] = ET_Builder_Element::get_module_order_class( $render_slug );
$this->add_classname( array(
$this->get_text_orientation_classname(),
if ( 1 === count( $et_pb_tab_titles ) ) {
$this->add_classname( 'et_pb_active_content' );
// Remove automatically added classnames
$this->remove_classname( array(
$content = $multi_view->render_element( array(
'content' => '{{content}}',
'class' => 'et_pb_tab_content',
</div> <!-- .et_pb_tab -->',
$this->module_classname( $render_slug ),
$parallax_image_background
new ET_Builder_Module_Tabs_Item;