: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
require_once 'helpers/Slider.php';
class ET_Builder_Module_Post_Slider extends ET_Builder_Module_Type_PostBased {
$this->name = esc_html__( 'Post Slider', 'et_builder' );
$this->plural = esc_html__( 'Post Sliders', 'et_builder' );
$this->slug = 'et_pb_post_slider';
$this->vb_support = 'on';
// Save processed background so it can be modified & reapplied on another element
$this->save_processed_background = true;
// need to use global settings from the slider module
$this->global_settings_slug = 'et_pb_slider';
$this->main_css_element = '%%order_class%%.et_pb_slider';
$this->settings_modal_toggles = array(
'main_content' => et_builder_i18n( 'Content' ),
'elements' => et_builder_i18n( 'Elements' ),
'featured_image' => esc_html__( 'Featured Image', 'et_builder' ),
'layout' => et_builder_i18n( 'Layout' ),
'overlay' => et_builder_i18n( 'Overlay' ),
'navigation' => esc_html__( 'Navigation', 'et_builder' ),
'title' => et_builder_i18n( 'Image' ),
'title' => et_builder_i18n( 'Text' ),
'title' => esc_html__( 'Animation', 'et_builder' ),
$this->advanced_fields = array(
'label' => et_builder_i18n( 'Title' ),
'main' => "{$this->main_css_element} .et_pb_slide_description .et_pb_slide_title, {$this->main_css_element} .et_pb_slide_description .et_pb_slide_title a",
'important' => array( 'size', 'font-size', 'plugin_all' ),
'label' => et_builder_i18n( 'Body' ),
'line_height' => "{$this->main_css_element}, {$this->main_css_element} .et_pb_slide_content",
'main' => "{$this->main_css_element} .et_pb_slide_content, {$this->main_css_element} .et_pb_slide_content div",
'block_elements' => array(
'tabbed_subtoggles' => true,
'bb_icons_support' => true,
'link' => "{$this->main_css_element} .et_pb_slide_content a",
'ul' => "{$this->main_css_element} .et_pb_slide_content ul li",
'ul_item_indent' => "{$this->main_css_element} .et_pb_slide_content ul",
'ol' => "{$this->main_css_element} .et_pb_slide_content ol li",
'ol_item_indent' => "{$this->main_css_element} .et_pb_slide_content ol",
'quote' => "{$this->main_css_element} .et_pb_slide_content blockquote",
'label' => esc_html__( 'Meta', 'et_builder' ),
'main' => "{$this->main_css_element} .et_pb_slide_content .post-meta, {$this->main_css_element} .et_pb_slide_content .post-meta a",
'limited_main' => "{$this->main_css_element} .et_pb_slide_content .post-meta, {$this->main_css_element} .et_pb_slide_content .post-meta a, {$this->main_css_element} .et_pb_slide_content .post-meta span",
'letter_spacing' => array(
'label' => esc_html__( 'Image Box Shadow', 'et_builder' ),
'option_category' => 'layout',
'tab_slug' => 'advanced',
'toggle_slug' => 'image',
'main' => '%%order_class%% .et_pb_slide_image img',
'default_on_fronts' => array(
'label' => et_builder_i18n( 'Button' ),
'main' => "{$this->main_css_element} .et_pb_more_button.et_pb_button",
'limited_main' => "{$this->main_css_element} .et_pb_more_button.et_pb_button",
'alignment' => "{$this->main_css_element} .et_pb_button_wrapper",
'main' => '%%order_class%% .et_pb_button',
'margin_padding' => array(
'main' => "{$this->main_css_element}, {$this->main_css_element}.et_pb_bg_layout_dark",
'parallax_method' => array(
'background_color' => array(
'default' => et_builder_accent_color(),
'border_radii' => '%%order_class%%, %%order_class%% .et_pb_slide, %%order_class%% .et_pb_slide_overlay_container',
'border_radii' => '%%order_class%% .et_pb_slide .et_pb_slide_image img',
'border_styles' => '%%order_class%% .et_pb_slide .et_pb_slide_image img',
'label_prefix' => et_builder_i18n( 'Image' ),
'tab_slug' => 'advanced',
'toggle_slug' => 'image',
'depends_show_if' => 'off',
'border_radii' => 'on||||',
'border_styles' => array(
'margin_padding' => array(
'main' => '%%order_class%%',
'padding' => '%%order_class%% .et_pb_slide_description, .et_pb_slider_fullwidth_off%%order_class%% .et_pb_slide_description',
'important' => array( 'custom_margin' ), // needed to overwrite last module margin-bottom styling
'use_background_layout' => true,
'main' => implode( ', ', array(
'%%order_class%% .et_pb_slide .et_pb_slide_description .et_pb_slide_title',
'%%order_class%% .et_pb_slide .et_pb_slide_description .et_pb_slide_title a',
'%%order_class%% .et_pb_slide .et_pb_slide_description .et_pb_slide_content',
'%%order_class%% .et_pb_slide .et_pb_slide_description .et_pb_slide_content .post-meta',
'%%order_class%% .et_pb_slide .et_pb_slide_description .et_pb_slide_content .post-meta a',
'%%order_class%% .et_pb_slide .et_pb_slide_description .et_pb_slide_content .et_pb_button',
'text_orientation' => '%%order_class%% .et_pb_slide .et_pb_slide_description',
'text_shadow' => '%%order_class%% .et_pb_slide .et_pb_slide_description',
'text_orientation' => array(
'default_on_front' => 'center',
'background_layout' => array(
'default_on_front' => 'dark',
'child_filters_target' => array(
'tab_slug' => 'advanced',
'toggle_slug' => 'image',
'main' => '%%order_class%% .et_pb_slide_image',
'main' => '%%order_class%%, %%order_class%% .et_pb_slide',
'use_module_alignment' => false,
'main' => '%%order_class%% .et_pb_slide > .et_pb_container',
'label' => esc_html__( 'Content Width', 'et_builder' ),
'label' => esc_html__( 'Content Max Width', 'et_builder' ),
'position_fields' => array(
$this->custom_css_fields = array(
'slide_description' => array(
'label' => esc_html__( 'Slide Description', 'et_builder' ),
'selector' => '.et_pb_slide_description',
'label' => esc_html__( 'Slide Title', 'et_builder' ),
'selector' => '.et_pb_slide_description .et_pb_slide_title',
'label' => esc_html__( 'Slide Meta', 'et_builder' ),
'selector' => '.et_pb_slide_content .post-meta',
'label' => esc_html__( 'Slide Button', 'et_builder' ),
'selector' => '.et_pb_slider a.et_pb_more_button.et_pb_button',
'no_space_before_selector' => true,
'slide_controllers' => array(
'label' => esc_html__( 'Slide Controllers', 'et_builder' ),
'selector' => '.et-pb-controllers',
'slide_active_controller' => array(
'label' => esc_html__( 'Slide Active Controller', 'et_builder' ),
'selector' => '.et-pb-controllers .et-pb-active-control',
'label' => esc_html__( 'Slide Image', 'et_builder' ),
'selector' => '.et_pb_slide_image',
'label' => esc_html__( 'Slide Arrows', 'et_builder' ),
'selector' => '.et-pb-slider-arrows a',
$this->help_videos = array(
'name' => esc_html__( 'An introduction to the Post Slider module', 'et_builder' ),
'use_current_loop' => array(
'label' => esc_html__( 'Posts For Current Page', 'et_builder' ),
'type' => 'yes_no_button',
'option_category' => 'configuration',
'on' => et_builder_i18n( 'Yes' ),
'off' => et_builder_i18n( 'No' ),
'description' => esc_html__( 'Display posts for the current page. Useful on archive and index pages.', 'et_builder' ),
'computed_affects' => array(
'toggle_slug' => 'main_content',
'function.isTBLayout' => 'on',
'label' => esc_html__( 'Post Count', 'et_builder' ),
'option_category' => 'configuration',
'description' => esc_html__( 'Choose how many posts you would like to display in the slider.', 'et_builder' ),
'toggle_slug' => 'main_content',
'computed_affects' => array(
'include_categories' => array(
'label' => esc_html__( 'Included Categories', 'et_builder' ),
'meta_categories' => array(
'all' => esc_html__( 'All Categories', 'et_builder' ),
'current' => esc_html__( 'Current Category', 'et_builder' ),
'option_category' => 'basic_option',
'renderer_options' => array(
'description' => esc_html__( 'Choose which categories you would like to include in the slider.', 'et_builder' ),
'toggle_slug' => 'main_content',
'computed_affects' => array(
'use_current_loop' => 'off',
'label' => esc_html__( 'Order By', 'et_builder' ),
'option_category' => 'configuration',
'date_desc' => esc_html__( 'Date: new to old', 'et_builder' ),
'date_asc' => esc_html__( 'Date: old to new', 'et_builder' ),
'title_asc' => esc_html__( 'Title: a-z', 'et_builder' ),
'title_desc' => esc_html__( 'Title: z-a', 'et_builder' ),
'rand' => esc_html__( 'Random', 'et_builder' ),
'toggle_slug' => 'main_content',
'description' => esc_html__( 'Here you can adjust the order in which posts are displayed.', 'et_builder' ),
'computed_affects' => array(
'use_current_loop' => 'off',
'default_on_front' => 'date_desc',
'label' => esc_html__( 'Show Arrows', 'et_builder' ),
'type' => 'yes_no_button',
'option_category' => 'configuration',
'on' => et_builder_i18n( 'Yes' ),
'off' => et_builder_i18n( 'No' ),
'default_on_front' => 'on',
'toggle_slug' => 'elements',
'description' => esc_html__( 'This setting will turn on and off the navigation arrows.', 'et_builder' ),
'mobile_options' => true,
'show_pagination' => array(
'label' => esc_html__( 'Show Controls', 'et_builder' ),
'type' => 'yes_no_button',
'option_category' => 'configuration',
'on' => et_builder_i18n( 'Yes' ),
'off' => et_builder_i18n( 'No' ),
'default_on_front' => 'on',
'toggle_slug' => 'elements',
'description' => esc_html__( 'This setting will turn on and off the circle buttons at the bottom of the slider.', 'et_builder' ),
'mobile_options' => true,
'show_more_button' => array(
'label' => esc_html__( 'Show Read More Button', 'et_builder' ),
'type' => 'yes_no_button',
'option_category' => 'configuration',
'on' => et_builder_i18n( 'Yes' ),
'off' => et_builder_i18n( 'No' ),
'default_on_front' => 'on',
'toggle_slug' => 'elements',
'description' => esc_html__( 'This setting will turn on and off the read more button.', 'et_builder' ),
'mobile_options' => true,
'label' => et_builder_i18n( 'Button' ),
'option_category' => 'configuration',
'default_on_front' => esc_html__( 'Read More', 'et_builder' ),
'depends_show_if' => 'on',
'toggle_slug' => 'main_content',
'dynamic_content' => 'text',
'description' => esc_html__( 'Define the text which will be displayed on "Read More" button. leave blank for default ( Read More )', 'et_builder' ),
'mobile_options' => true,
'content_source' => array(
'label' => esc_html__( 'Content Display', 'et_builder' ),
'option_category' => 'configuration',
'off' => esc_html__( 'Show Excerpt', 'et_builder' ),
'on' => esc_html__( 'Show Content', 'et_builder' ),
'description' => esc_html__( 'Showing the full content will not truncate your posts in the slider. Showing the excerpt will only display excerpt text.', 'et_builder' ),
'toggle_slug' => 'main_content',
'computed_affects' => array(
'mobile_options' => true,
'use_manual_excerpt' => array(
'label' => esc_html__( 'Use Post Excerpts', 'et_builder' ),
'type' => 'yes_no_button',
'option_category' => 'configuration',
'on' => et_builder_i18n( 'Yes' ),
'off' => et_builder_i18n( 'No' ),
'depends_show_if' => 'off',
'description' => esc_html__( 'Disable this option if you want to ignore manually defined excerpts and always generate it automatically.', 'et_builder' ),
'toggle_slug' => 'main_content',
'computed_affects' => array(
'excerpt_length' => array(
'label' => esc_html__( 'Excerpt Length', 'et_builder' ),
'option_category' => 'configuration',
'depends_show_if' => 'off',
'description' => esc_html__( 'Define the length of automatically generated excerpts. Leave blank for default ( 270 ) ', 'et_builder' ),
'toggle_slug' => 'main_content',
'computed_affects' => array(
'label' => esc_html__( 'Show Post Meta', 'et_builder' ),
'type' => 'yes_no_button',
'option_category' => 'configuration',
'on' => et_builder_i18n( 'Yes' ),
'off' => et_builder_i18n( 'No' ),
'default_on_front' => 'on',
'toggle_slug' => 'elements',
'description' => esc_html__( 'This setting will turn on and off the meta section.', 'et_builder' ),
'mobile_options' => true,
'label' => esc_html__( 'Show Featured Image', 'et_builder' ),
'type' => 'yes_no_button',
'option_category' => 'configuration',
'on' => et_builder_i18n( 'Yes' ),
'off' => et_builder_i18n( 'No' ),
'default_on_front' => 'on',