: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
class DSM_PriceList extends ET_Builder_Module {
public $slug = 'dsm_pricelist';
public $vb_support = 'on';
public $child_slug = 'dsm_pricelist_child';
protected $module_credits = array(
'module_uri' => 'https://divisupreme.com/',
'author' => 'Divi Supreme',
'author_uri' => 'https://divisupreme.com/',
$this->name = esc_html__( 'Supreme Price List', 'dsm-supreme-modules-for-divi' );
$this->icon_path = plugin_dir_path( __FILE__ ) . 'icon.svg';
$this->settings_modal_toggles = array(
'main_content' => esc_html__( 'Text', 'dsm-supreme-modules-for-divi' ),
'title' => esc_html__( 'Separator', 'dsm-supreme-modules-for-divi' ),
'title' => esc_html__( 'Image', 'dsm-supreme-modules-for-divi' ),
public function get_advanced_fields_config() {
'label' => esc_html__( 'Title', 'dsm-supreme-modules-for-divi' ),
'main' => '%%order_class%% .dsm-pricelist-title',
'letter_spacing' => array(
'hide_header_level' => true,
'hide_text_align' => true,
'label' => esc_html__( 'Description', 'dsm-supreme-modules-for-divi' ),
'main' => '%%order_class%% .dsm-pricelist-description',
'letter_spacing' => array(
'hide_text_align' => true,
'label' => esc_html__( 'Price', 'dsm-supreme-modules-for-divi' ),
'main' => '%%order_class%% .dsm-pricelist-price',
'letter_spacing' => array(
'hide_text_align' => true,
'use_text_orientation' => false,
'use_background_layout' => false,
'text_shadow' => '%%order_class%% .dsm_pricelist_child',
'border_radii' => '%%order_class%%',
'border_styles' => '%%order_class%%',
'border_radii' => '%%order_class%% .dsm-pricelist-image img',
'border_styles' => '%%order_class%% .dsm-pricelist-image img',
'label_prefix' => esc_html__( 'Image', 'dsm-supreme-modules-for-divi' ),
'tab_slug' => 'advanced',
'toggle_slug' => 'image',
'border_radii' => '%%order_class%% .dsm-pricelist-price',
'border_styles' => '%%order_class%% .dsm-pricelist-price',
'label_prefix' => esc_html__( 'Price', 'dsm-supreme-modules-for-divi' ),
'tab_slug' => 'advanced',
'toggle_slug' => 'price',
'main' => '%%order_class%%',
'label' => esc_html__( 'Image Box Shadow', 'dsm-supreme-modules-for-divi' ),
'option_category' => 'layout',
'tab_slug' => 'advanced',
'toggle_slug' => 'image',
'main' => '%%order_class%% .dsm-pricelist-image img',
'default_on_fronts' => array(
'label' => esc_html__( 'Price Box Shadow', 'dsm-supreme-modules-for-divi' ),
'option_category' => 'layout',
'tab_slug' => 'advanced',
'toggle_slug' => 'price',
'main' => '%%order_class%% .dsm-pricelist-price',
'default_on_fronts' => array(
public function get_fields() {
'content_orientation' => array(
'label' => esc_html__( 'Vertical Alignment', 'dsm-supreme-modules-for-divi' ),
'option_category' => 'layout',
'flex-start' => esc_html__( 'Top', 'dsm-supreme-modules-for-divi' ),
'center' => esc_html__( 'Center', 'dsm-supreme-modules-for-divi' ),
'flex-end' => esc_html__( 'Bottom', 'dsm-supreme-modules-for-divi' ),
'default' => 'flex-start',
'tab_slug' => 'advanced',
'description' => esc_html__( 'This setting determines the vertical alignment of your content. Your content can either be align to the top, vertically centered, or aligned to the bottom.', 'dsm-supreme-modules-for-divi' ),
'item_bottom_gap' => array(
'label' => esc_html__( 'Item Bottom Spacing', 'dsm-supreme-modules-for-divi' ),
'option_category' => 'configuration',
'default_on_front' => '25px',
'range_settings' => array(
'tab_slug' => 'advanced',
'toggle_slug' => 'width',
'mobile_options' => true,
'separator_style' => array(
'label' => esc_html__( 'Style', 'dsm-supreme-modules-for-divi' ),
'option_category' => 'configuration',
'options' => et_divi_divider_style_choices(),
'tab_slug' => 'advanced',
'toggle_slug' => 'separator',
'separator_weight' => array(
'label' => esc_html__( 'Weight', 'dsm-supreme-modules-for-divi' ),
'option_category' => 'configuration',
'default_on_front' => '2px',
'range_settings' => array(
'tab_slug' => 'advanced',
'toggle_slug' => 'separator',
'separator_color' => array(
'label' => esc_html__( 'Color', 'dsm-supreme-modules-for-divi' ),
'description' => esc_html__( 'Here you can define a custom color for your separator.', 'dsm-supreme-modules-for-divi' ),
'tab_slug' => 'advanced',
'toggle_slug' => 'separator',
'separator_gap' => array(
'label' => esc_html__( 'Gap Spacing', 'dsm-supreme-modules-for-divi' ),
'option_category' => 'configuration',
'default_on_front' => '10px',
'range_settings' => array(
'tab_slug' => 'advanced',
'toggle_slug' => 'separator',
'mobile_options' => true,
'image_max_width' => array(
'label' => esc_html__( 'Image Width', 'dsm-supreme-modules-for-divi' ),
'option_category' => 'layout',
'tab_slug' => 'advanced',
'toggle_slug' => 'image',
'depends_show_if' => 'off',
'default_on_front' => '',
'range_settings' => array(
'mobile_options' => true,
'image_spacing' => array(
'label' => esc_html__( 'Image Gap Spacing', 'dsm-supreme-modules-for-divi' ),
'option_category' => 'layout',
'tab_slug' => 'advanced',
'toggle_slug' => 'image',
'default_on_front' => '',
'range_settings' => array(
'mobile_options' => true,
'price_background_color' => array(
'label' => esc_html__( 'Price Background Color', 'dsm-supreme-modules-for-divi' ),
'description' => esc_html__( 'Here you can define a custom background color for your price.', 'dsm-supreme-modules-for-divi' ),
'tab_slug' => 'advanced',
'toggle_slug' => 'price',
'mobile_options' => true,
'price_padding' => array(
'label' => esc_html__( 'Padding', 'dsm-supreme-modules-for-divi' ),
'type' => 'custom_padding',
'option_category' => 'layout',
'tab_slug' => 'advanced',
'toggle_slug' => 'price',
'default_on_front' => '',
'mobile_options' => true,
public function get_transition_fields_css_props() {
$fields = parent::get_transition_fields_css_props();
$fields['image_spacing'] = array(
'margin-right' => '%%order_class%% .dsm-pricelist-image',
$fields['image_max_width'] = array(
'max-width' => '%%order_class%% .dsm-pricelist-image',
$fields['price_background_color'] = array(
'background-color' => '%%order_class%% .dsm-pricelist-price',
$fields['price_padding'] = array(
'padding' => '%%order_class%% .dsm-pricelist-price',
$fields['separator_gap'] = array(
'margin-left' => '%%order_class%% .dsm-pricelist-separator',
'margin-right' => '%%order_class%% .dsm-pricelist-separator',
$fields['item_bottom_gap'] = array(
'padding-bottom' => '%%order_class%% .dsm_pricelist_child:not(:last-child)',
public function render( $attrs, $content, $render_slug ) {
$content_orientation = $this->props['content_orientation'];
$separator_style = $this->props['separator_style'];
$separator_weight = $this->props['separator_weight'];
$separator_color = $this->props['separator_color'];
$separator_gap_hover = $this->get_hover_value( 'separator_gap' );
$separator_gap = $this->props['separator_gap'];
$separator_gap_tablet = $this->props['separator_gap_tablet'];
$separator_gap_phone = $this->props['separator_gap_phone'];
$separator_gap_last_edited = $this->props['separator_gap_last_edited'];
$item_bottom_gap_hover = $this->get_hover_value( 'item_bottom_gap' );
$item_bottom_gap = $this->props['item_bottom_gap'];
$item_bottom_gap_tablet = $this->props['item_bottom_gap_tablet'];
$item_bottom_gap_phone = $this->props['item_bottom_gap_phone'];
$item_bottom_gap_last_edited = $this->props['item_bottom_gap_last_edited'];
$image_spacing_hover = $this->get_hover_value( 'image_spacing' );
$image_spacing = $this->props['image_spacing'];
$image_spacing_tablet = $this->props['image_spacing_tablet'];
$image_spacing_phone = $this->props['image_spacing_phone'];
$image_spacing_last_edited = $this->props['image_spacing_last_edited'];
$image_max_width_hover = $this->get_hover_value( 'image_max_width' );
$image_max_width = $this->props['image_max_width'];
$image_max_width_tablet = $this->props['image_max_width_tablet'];
$image_max_width_phone = $this->props['image_max_width_phone'];
$image_max_width_last_edited = $this->props['image_max_width_last_edited'];
$price_background_color_hover = $this->get_hover_value( 'price_background_color' );
$price_background_color = $this->props['price_background_color'];
$price_background_color_tablet = $this->props['price_background_color_tablet'];
$price_background_color_phone = $this->props['price_background_color_phone'];
$price_background_color_last_edited = $this->props['price_background_color_last_edited'];
$price_padding = $this->props['price_padding'];
$price_padding_hover = $this->get_hover_value( 'price_padding' );
$price_padding_values = et_pb_responsive_options()->get_property_values( $this->props, 'price_padding' );
$price_padding_tablet = isset( $price_padding_values['tablet'] ) ? $price_padding_values['tablet'] : '';
$price_padding_phone = isset( $price_padding_values['phone'] ) ? $price_padding_values['phone'] : '';
$price_padding_last_edited = $this->props['price_padding_last_edited'];
if ( '' !== $item_bottom_gap_tablet || '' !== $item_bottom_gap_phone || '' !== $item_bottom_gap ) {
$item_bottom_gap_responsive_active = et_pb_get_responsive_status( $item_bottom_gap_last_edited );
$item_bottom_gap_values = array(
'desktop' => $item_bottom_gap,
'tablet' => $item_bottom_gap_responsive_active ? $item_bottom_gap_tablet : '',
'phone' => $item_bottom_gap_responsive_active ? $item_bottom_gap_phone : '',
et_pb_responsive_options()->generate_responsive_css( $item_bottom_gap_values, '%%order_class%% .dsm_pricelist_child:not(:last-child)', 'padding-bottom', $render_slug );
if ( et_builder_is_hover_enabled( 'item_bottom_gap', $this->props ) ) {
ET_Builder_Element::set_style(
'selector' => $this->add_hover_to_order_class( '%%order_class%% .dsm_pricelist_child:not(:last-child)' ),
'declaration' => sprintf(
esc_html( $item_bottom_gap_hover )
if ( '' !== $image_max_width_tablet || '' !== $image_max_width_phone || '' !== $image_max_width ) {
$image_max_width_responsive_active = et_pb_get_responsive_status( $image_max_width_last_edited );
$image_max_width_values = array(
'desktop' => $image_max_width,
'tablet' => $image_max_width_responsive_active ? $image_max_width_tablet : '',
'phone' => $image_max_width_responsive_active ? $image_max_width_phone : '',
et_pb_responsive_options()->generate_responsive_css( $image_max_width_values, '%%order_class%% .dsm-pricelist-image', 'max-width', $render_slug );
if ( et_builder_is_hover_enabled( 'image_max_width', $this->props ) ) {
ET_Builder_Element::set_style(
'selector' => $this->add_hover_to_order_class( '%%order_class%% .dsm-pricelist-image' ),
'declaration' => sprintf(
esc_html( $image_max_width_hover )
if ( '' !== $image_spacing_tablet || '' !== $image_spacing_phone || '' !== $image_spacing ) {
$image_spacing_responsive_active = et_pb_get_responsive_status( $image_spacing_last_edited );
$image_spacing_values = array(
'desktop' => $image_spacing,
'tablet' => $image_spacing_responsive_active ? $image_spacing_tablet : '',
'phone' => $image_spacing_responsive_active ? $image_spacing_phone : '',
et_pb_responsive_options()->generate_responsive_css( $image_spacing_values, '%%order_class%% .dsm-pricelist-image', 'margin-right', $render_slug );
if ( et_builder_is_hover_enabled( 'image_spacing', $this->props ) ) {
ET_Builder_Element::set_style(
'selector' => $this->add_hover_to_order_class( '%%order_class%% .dsm-pricelist-image' ),
'declaration' => sprintf(
esc_html( $image_spacing_hover )
if ( 'dotted' !== $separator_style ) {
ET_Builder_Element::set_style(
'selector' => '%%order_class%% .dsm-pricelist-separator',
'declaration' => sprintf(
'border-bottom-style: %1$s;',
esc_attr( $separator_style )
if ( '2px' !== $separator_weight ) {
ET_Builder_Element::set_style(
'selector' => '%%order_class%% .dsm-pricelist-separator',
'declaration' => sprintf(
'border-bottom-width: %1$s;',
esc_attr( $separator_weight )
if ( '' !== $separator_color ) {
ET_Builder_Element::set_style(
'selector' => '%%order_class%% .dsm-pricelist-separator',
'declaration' => sprintf(
'border-bottom-color: %1$s;',
esc_html( $separator_color )