: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
$custom_icon_phone = isset( $custom_icon_values['phone'] ) ? $custom_icon_values['phone'] : '';
$et_pb_pricing_tables_num = 0;
$et_pb_pricing_tables_icon = 'on' === $button_custom ? $custom_icon : '';
$et_pb_pricing_tables_icon_tablet = 'on' === $button_custom ? $custom_icon_tablet : '';
$et_pb_pricing_tables_icon_phone = 'on' === $button_custom ? $custom_icon_phone : '';
$et_pb_pricing_tables_button_rel = $this->props['button_rel'];
$et_pb_pricing_tables_header_level = 'h2' === $this->props['header_level'] ? '' : $this->props['header_level'];
function render( $attrs, $content = null, $render_slug ) {
$multi_view = et_pb_multi_view_options( $this );
$featured_table = $this->get_featured_table( $content );
$featured_table_background_color_hover = $this->get_hover_value( 'featured_table_background_color' );
$featured_table_background_color_values = et_pb_responsive_options()->get_property_values( $this->props, 'featured_table_background_color' );
$featured_table_text_color_hover = $this->get_hover_value( 'featured_table_text_color' );
$featured_table_text_color_values = et_pb_responsive_options()->get_property_values( $this->props, 'featured_table_text_color' );
$header_background_color_hover = $this->get_hover_value( 'header_background_color' );
$header_background_color_values = et_pb_responsive_options()->get_property_values( $this->props, 'header_background_color' );
$featured_table_header_background_color_hover = $this->get_hover_value( 'featured_table_header_background_color' );
$featured_table_header_background_color_values = et_pb_responsive_options()->get_property_values( $this->props, 'featured_table_header_background_color' );
$featured_table_header_text_color_hover = $this->get_hover_value( 'featured_table_header_text_color' );
$featured_table_header_text_color_values = et_pb_responsive_options()->get_property_values( $this->props, 'featured_table_header_text_color' );
$featured_table_subheader_text_color_hover = $this->get_hover_value( 'featured_table_subheader_text_color' );
$featured_table_subheader_text_color_values = et_pb_responsive_options()->get_property_values( $this->props, 'featured_table_subheader_text_color' );
$featured_table_currency_text_color_hover = $this->get_hover_value( 'featured_table_currency_frequency_text_color' );
$featured_table_currency_text_color_values = et_pb_responsive_options()->get_property_values( $this->props, 'featured_table_currency_frequency_text_color' );
$featured_table_price_color_hover = $this->get_hover_value( 'featured_table_price_color' );
$featured_table_price_color_values = et_pb_responsive_options()->get_property_values( $this->props, 'featured_table_price_color' );
$bullet_color_hover = $this->get_hover_value( 'bullet_color' );
$bullet_color_values = et_pb_responsive_options()->get_property_values( $this->props, 'bullet_color' );
$featured_table_bullet_color_hover = $this->get_hover_value( 'featured_table_bullet_color' );
$featured_table_bullet_color_values = et_pb_responsive_options()->get_property_values( $this->props, 'featured_table_bullet_color' );
$featured_table_excluded_text_color_hover = $this->get_hover_value( 'featured_table_excluded_text_color' );
$featured_table_excluded_text_color_values = et_pb_responsive_options()->get_property_values( $this->props, 'featured_table_excluded_text_color' );
$featured_table_price_background_color_hover = $this->get_hover_value( 'featured_table_price_background_color' );
$featured_table_price_background_color_values = et_pb_responsive_options()->get_property_values( $this->props, 'featured_table_price_background_color' );
$price_background_color_hover = $this->get_hover_value( 'price_background_color' );
$price_background_color_values = et_pb_responsive_options()->get_property_values( $this->props, 'price_background_color' );
$show_featured_drop_shadow = $this->props['show_featured_drop_shadow'];
$show_featured_drop_shadow_values = et_pb_responsive_options()->get_property_values( $this->props, 'show_featured_drop_shadow' );
$show_featured_drop_shadow_tablet = isset( $show_featured_drop_shadow_values['tablet'] ) ? $show_featured_drop_shadow_values['tablet'] : '';
$show_featured_drop_shadow_phone = isset( $show_featured_drop_shadow_values['phone'] ) ? $show_featured_drop_shadow_values['phone'] : '';
$body_text_align_values = et_pb_responsive_options()->get_property_values( $this->props, 'body_text_align' );
global $et_pb_pricing_tables_num, $et_pb_pricing_tables_icon, $et_pb_pricing_tables_icon_tablet, $et_pb_pricing_tables_icon_phone;
// Show Featured Drop Shadow.
$disabled_shadow = 'none';
$reset_shadow = '0 0 12px rgba(0,0,0,0.1)';
$featured_shadow_tablet = '';
$featured_shadow_phone = '';
if ( 'on' !== $show_featured_drop_shadow ) {
$featured_shadow = 'none';
if ( '' !== $show_featured_drop_shadow_tablet ) {
if ( 'on' !== $show_featured_drop_shadow_tablet ) {
$featured_shadow_tablet = $disabled_shadow;
} elseif ( 'on' === $show_featured_drop_shadow_tablet && 'on' !== $featured_shadow ) {
$featured_shadow_tablet = $reset_shadow;
if ( $featured_shadow_tablet === $featured_shadow ) {
$featured_shadow_tablet = '';
if ( '' !== $show_featured_drop_shadow_phone ) {
if ( 'on' !== $show_featured_drop_shadow_phone ) {
$featured_shadow_phone = $disabled_shadow;
} elseif ( 'on' === $show_featured_drop_shadow_phone && 'on' !== $featured_shadow_tablet ) {
$featured_shadow_phone = $reset_shadow;
if ( $featured_shadow_phone === $featured_shadow_tablet ) {
$featured_shadow_phone = '';
$featured_shadow_values = array(
'desktop' => esc_html( $featured_shadow ),
'tablet' => esc_html( $featured_shadow_tablet ),
'phone' => esc_html( $featured_shadow_phone ),
et_pb_responsive_options()->generate_responsive_css( $featured_shadow_values, '%%order_class%% .et_pb_featured_table', array( '-moz-box-shadow', '-webkit-box-shadow', 'box-shadow' ), $render_slug, '', 'shadow' );
// Featured Table Background Color.
et_pb_responsive_options()->generate_responsive_css( $featured_table_background_color_values, '%%order_class%% .et_pb_featured_table', 'background-color', $render_slug, '', 'color' );
if ( et_builder_is_hover_enabled( 'featured_table_background_color', $this->props ) ) {
ET_Builder_Element::set_style( $render_slug, array(
'selector' => '%%order_class%% .et_pb_featured_table:hover',
'declaration' => sprintf(
'background-color: %1$s;',
esc_html( $featured_table_background_color_hover )
// Header Background Color.
et_pb_responsive_options()->generate_responsive_css( $header_background_color_values, '%%order_class%% .et_pb_pricing_heading', 'background-color', $render_slug, '', 'color' );
if ( et_builder_is_hover_enabled( 'header_background_color', $this->props ) ) {
ET_Builder_Element::set_style( $render_slug, array(
'selector' => '%%order_class%% .et_pb_pricing_table:hover .et_pb_pricing_heading',
'declaration' => sprintf(
'background-color: %1$s;',
esc_html( $header_background_color_hover )
// Featured Table Header Background Color.
et_pb_responsive_options()->generate_responsive_css( $featured_table_header_background_color_values, '%%order_class%% .et_pb_featured_table .et_pb_pricing_heading', 'background-color', $render_slug, ' !important;', 'color' );
if ( et_builder_is_hover_enabled( 'featured_table_header_background_color', $this->props ) ) {
ET_Builder_Element::set_style( $render_slug, array(
'selector' => '%%order_class%% .et_pb_featured_table:hover .et_pb_pricing_heading' ,
'declaration' => sprintf(
'background-color: %1$s !important;',
esc_html( $featured_table_header_background_color_hover )
// Featured Table Title Text Color.
et_pb_responsive_options()->generate_responsive_css( $featured_table_header_text_color_values, '%%order_class%% .et_pb_featured_table .et_pb_pricing_heading h2, %%order_class%% .et_pb_featured_table .et_pb_pricing_heading .et_pb_pricing_title', 'color', $render_slug, ' !important;', 'color' );
if ( et_builder_is_hover_enabled( 'featured_table_header_text_color', $this->props ) ) {
ET_Builder_Element::set_style( $render_slug, array(
'selector' => '%%order_class%% .et_pb_featured_table:hover .et_pb_pricing_heading h2, %%order_class%% .et_pb_featured_table:hover .et_pb_pricing_heading .et_pb_pricing_title',
'declaration' => sprintf(
'color: %1$s !important;',
esc_html( $featured_table_header_text_color_hover )
// Featured Table Sutitle Text Color.
et_pb_responsive_options()->generate_responsive_css( $featured_table_subheader_text_color_values, '%%order_class%% .et_pb_featured_table .et_pb_best_value', 'color', $render_slug, ' !important;', 'color' );
if ( et_builder_is_hover_enabled( 'featured_table_subheader_text_color', $this->props ) ) {
ET_Builder_Element::set_style( $render_slug, array(
'selector' => '%%order_class%% .et_pb_featured_table:hover .et_pb_best_value',
'declaration' => sprintf(
'color: %1$s !important;',
esc_html( $featured_table_subheader_text_color_hover )
// Featured Table Price Text Color.
et_pb_responsive_options()->generate_responsive_css( $featured_table_price_color_values, '%%order_class%% .et_pb_featured_table .et_pb_sum', 'color', $render_slug, ' !important;', 'color' );
if ( et_builder_is_hover_enabled( 'featured_table_price_color', $this->props ) ) {
ET_Builder_Element::set_style( $render_slug, array(
'selector' => '%%order_class%% .et_pb_featured_table:hover .et_pb_sum',
'declaration' => sprintf(
'color: %1$s !important;',
esc_html( $featured_table_price_color_hover )
// Featured Table Body Text Color.
$featured_table_text_color_selector = et_builder_has_limitation( 'use_additional_limiting_styles' ) ? '%%order_class%% .et_pb_featured_table .et_pb_pricing_content li, %%order_class%% .et_pb_featured_table .et_pb_pricing_content li span, %%order_class%% .et_pb_featured_table .et_pb_pricing_content li a' : '%%order_class%% .et_pb_featured_table .et_pb_pricing_content li';
et_pb_responsive_options()->generate_responsive_css( $featured_table_text_color_values, $featured_table_text_color_selector, 'color', $render_slug, ' !important;', 'color' );
if ( et_builder_is_hover_enabled( 'featured_table_text_color', $this->props ) ) {
$featured_table_text_color_selector_hover = et_is_builder_plugin_active() ? '%%order_class%% .et_pb_featured_table:hover .et_pb_pricing_content li, %%order_class%% .et_pb_featured_table:hover .et_pb_pricing_content li span, %%order_class%% .et_pb_featured_table:hover .et_pb_pricing_content li a' : '%%order_class%% .et_pb_featured_table:hover .et_pb_pricing_content li';
ET_Builder_Element::set_style( $render_slug, array(
'selector' => $featured_table_text_color_selector_hover,
'declaration' => sprintf(
'color: %1$s !important;',
esc_html( $featured_table_text_color_hover )
et_pb_responsive_options()->generate_responsive_css( $bullet_color_values, '%%order_class%% .et_pb_pricing li span:before', 'border-color', $render_slug, '', 'color' );
if ( et_builder_is_hover_enabled( 'bullet_color', $this->props ) ) {
ET_Builder_Element::set_style( $render_slug, array(
'selector' => '%%order_class%% .et_pb_pricing:hover li span:before',
'declaration' => sprintf(
esc_html( $bullet_color_hover )
// Featured Table Bullet Color.
et_pb_responsive_options()->generate_responsive_css( $featured_table_bullet_color_values, '%%order_class%% .et_pb_featured_table .et_pb_pricing li span:before', 'border-color', $render_slug, '', 'color' );
if ( et_builder_is_hover_enabled( 'featured_table_bullet_color', $this->props ) ) {
ET_Builder_Element::set_style( $render_slug, array(
'selector' => '%%order_class%% .et_pb_featured_table:hover .et_pb_pricing li span:before',
'declaration' => sprintf(
esc_html( $featured_table_bullet_color_hover )
// Featured Table Currency Frequency Text Color.
et_pb_responsive_options()->generate_responsive_css( $featured_table_currency_text_color_values, '%%order_class%% .et_pb_featured_table .et_pb_dollar_sign, %%order_class%% .et_pb_featured_table .et_pb_frequency', 'color', $render_slug, ' !important;', 'color' );
if ( et_builder_is_hover_enabled( 'featured_table_currency_frequency_text_color', $this->props ) ) {
ET_Builder_Element::set_style( $render_slug, array(
'selector' => '%%order_class%% .et_pb_featured_table:hover .et_pb_dollar_sign, %%order_class%% .et_pb_featured_table:hover .et_pb_frequency',
'declaration' => sprintf(
'color: %1$s !important;',
esc_html( $featured_table_currency_text_color_hover )
// Featured Table Excluded Item Text Color.
et_pb_responsive_options()->generate_responsive_css( $featured_table_excluded_text_color_values, '%%order_class%% .et_pb_featured_table .et_pb_pricing li.et_pb_not_available, %%order_class%% .et_pb_featured_table .et_pb_pricing li.et_pb_not_available span, %%order_class%% .et_pb_featured_table .et_pb_pricing li.et_pb_not_available a', 'color', $render_slug, ' !important;', 'color' );
if ( et_builder_is_hover_enabled( 'featured_table_excluded_text_color', $this->props ) ) {
ET_Builder_Element::set_style( $render_slug, array(
'selector' => '%%order_class%% .et_pb_featured_table:hover .et_pb_pricing li.et_pb_not_available, %%order_class%% .et_pb_featured_table:hover .et_pb_pricing li.et_pb_not_available span, %%order_class%% .et_pb_featured_table:hover .et_pb_pricing li.et_pb_not_available a',
'declaration' => sprintf(
'color: %1$s !important;',
esc_html( $featured_table_excluded_text_color_hover )
// Featured Table Price Background Color.
et_pb_responsive_options()->generate_responsive_css( $featured_table_price_background_color_values, '%%order_class%% .et_pb_featured_table .et_pb_pricing_content_top', 'background-color', $render_slug, '', 'color' );
if ( et_builder_is_hover_enabled( 'featured_table_price_background_color', $this->props ) ) {
ET_Builder_Element::set_style( $render_slug, array(
'selector' => '%%order_class%% .et_pb_featured_table:hover .et_pb_pricing_content_top',
'declaration' => sprintf(
'background-color: %1$s;',
esc_html( $featured_table_price_background_color_hover )
// Price Background Color.
et_pb_responsive_options()->generate_responsive_css( $price_background_color_values, '%%order_class%% .et_pb_pricing_content_top', 'background-color', $render_slug, '', 'color' );
if ( et_builder_is_hover_enabled( 'price_background_color', $this->props ) ) {
ET_Builder_Element::set_style( $render_slug, array(
'selector' => '%%order_class%%:hover .et_pb_pricing_content_top',
'declaration' => sprintf(
'background-color: %1$s;',
esc_html( $price_background_color_hover )
// Custom Padding Left On Center.
if ( ! empty( $body_text_align_values ) ) {
foreach( $body_text_align_values as $body_text_align_device => $body_text_align_value ) {
if ( 'center' !== $body_text_align_value ) {
$padding_left_style = array(
'selector' => '%%order_class%% .et_pb_pricing li',
'declaration' => esc_html( 'padding-left: 0;' ),
if ( 'desktop' !== $body_text_align_device ) {
$current_media_query = 'tablet' === $body_text_align_device ? 'max_width_980' : 'max_width_767';
$padding_left_style['media_query'] = ET_Builder_Element::get_media_query( $current_media_query );
ET_Builder_Element::set_style( $render_slug, $padding_left_style );
$video_background = $this->video_background();
$parallax_image_background = $this->get_parallax_image_background();
$content = $this->content;
$this->add_classname( array(
"et_pb_pricing_{$et_pb_pricing_tables_num}",
if ( 'off' === $multi_view->get_value( 'show_bullet' ) ) {
$this->add_classname( 'et_pb_pricing_no_bullet' );
// Remove automatically added classnames
$this->remove_classname( array(
$multi_view_data_attr = $multi_view->render_attrs( array(
'et_pb_pricing_no_bullet' => array(
'<div%3$s class="%2$s"%6$s>
<div class="et_pb_pricing_table_wrap">
$this->module_classname( $render_slug ),
$parallax_image_background,
$output .= $this->keep_box_shadow_compatibility( $attrs, $content, $render_slug );
function additional_render( $atts, $content = null, $function_name ) {
$attributes = shortcode_atts( array(
$output = sprintf( '<li%2$s><span>%1$s</span></li>',
( 'on' !== $attributes['available'] ? ' class="et_pb_not_available"' : '' )
private function get_featured_table( $content ) {
//Extract `et_pb_pricing_table` shortcode attributes
preg_match_all( '/\[et_pb_pricing_table(\s+[^\]]*)\]/', $content, $matches );
if ( ! isset( $matches[1] ) || 0 === count( $matches[1] ) ) {
foreach ( $matches[1] as $match ) {
//Check if the shortcode has the `feature` attribute on
//TODO: Find a better way to do that
$list[] = (bool) preg_match( '/[\s]featured=[\'|"]on[\'|"]/', $match );
//We need to know only the first 4 tables status,
//because in a row are maximum 4 tables
$count = count( $list ) > 4 ? 4 : count( $list );
for ( $i = 0; $i < $count; $i ++ ) {
if ( true === $list[ $i ] ) {
return 'et_pb_second_featured';
return 'et_pb_third_featured';
return 'et_pb_fourth_featured';
return 'et_pb_no_featured_in_first_row';
private function keep_box_shadow_compatibility( $atts, $content, $function_name ) {
* @var ET_Builder_Module_Field_BoxShadow $box_shadow
$box_shadow = ET_Builder_Module_Fields_Factory::get( 'BoxShadow' );
$utils = ET_Core_Data_Utils::instance();
version_compare( $utils->array_get( $atts, '_builder_version', '3.0.93' ), '3.0.97', 'lt' )
$box_shadow->is_inset( $box_shadow->get_value( $atts ) )
$class = '.' . self::get_module_order_class($function_name);
$overlay_shadow = $box_shadow->get_style( $class, $atts);
'<style type="text/css">%1$s %2$s %3$s</style>',
'.et_pb_pricing > .box-shadow-overlay { z-index: 11; }',
sprintf( '%1$s { box-shadow: none; }', esc_attr( $class ) ),
sprintf( '%1$s { %2$s }', esc_attr( $overlay_shadow['selector'] ), esc_attr( $overlay_shadow['declaration'] ) )
new ET_Builder_Module_Pricing_Tables;