: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
$fields['icon_font_size'] = array(
'font-size' => '%%order_class%% .et-pb-icon',
function render( $attrs, $content = null, $render_slug ) {
$multi_view = et_pb_multi_view_options( $this );
$url = $this->props['url'];
$image = $this->props['image'];
$url_new_window = $this->props['url_new_window'];
$alt = $this->_esc_attr( 'alt' );
$font_icon = $this->props['font_icon'];
$use_icon = $this->props['use_icon'];
$use_circle = $this->props['use_circle'];
$use_circle_border = $this->props['use_circle_border'];
$use_icon_font_size = $this->props['use_icon_font_size'];
$icon_font_size = $this->props['icon_font_size'];
$icon_font_size_hover = $this->get_hover_value( 'icon_font_size' );
$icon_font_size_tablet = $this->props['icon_font_size_tablet'];
$icon_font_size_phone = $this->props['icon_font_size_phone'];
$header_level = $this->props['header_level'];
$icon_font_size_last_edited = $this->props['icon_font_size_last_edited'];
$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'];
$content_max_width = $this->props['content_max_width'];
$content_max_width_tablet = $this->props['content_max_width_tablet'];
$content_max_width_phone = $this->props['content_max_width_phone'];
$content_max_width_last_edited = $this->props['content_max_width_last_edited'];
$icon_color = $this->props['icon_color'];
$icon_color_hover = $this->get_hover_value( 'icon_color' );
$icon_color_values = et_pb_responsive_options()->get_property_values( $this->props, 'icon_color' );
$icon_color_tablet = isset( $icon_color_values['tablet'] ) ? $icon_color_values['tablet'] : '';
$icon_color_phone = isset( $icon_color_values['phone'] ) ? $icon_color_values['phone'] : '';
$circle_color = $this->props['circle_color'];
$circle_color_hover = $this->get_hover_value( 'circle_color' );
$circle_color_values = et_pb_responsive_options()->get_property_values( $this->props, 'circle_color' );
$circle_color_tablet = isset( $circle_color_values['tablet'] ) ? $circle_color_values['tablet'] : '';
$circle_color_phone = isset( $circle_color_values['phone'] ) ? $circle_color_values['phone'] : '';
$circle_border_color = $this->props['circle_border_color'];
$circle_border_color_hover = $this->get_hover_value( 'circle_border_color' );
$circle_border_color_values = et_pb_responsive_options()->get_property_values( $this->props, 'circle_border_color' );
$circle_border_color_tablet = isset( $circle_border_color_values['tablet'] ) ? $circle_border_color_values['tablet'] : '';
$circle_border_color_phone = isset( $circle_border_color_values['phone'] ) ? $circle_border_color_values['phone'] : '';
$icon_placement = $this->props['icon_placement'];
$icon_placement_values = et_pb_responsive_options()->get_property_values( $this->props, 'icon_placement' );
$icon_placement_tablet = isset( $icon_placement_values['tablet'] ) ? $icon_placement_values['tablet'] : '';
$icon_placement_phone = isset( $icon_placement_values['phone'] ) ? $icon_placement_values['phone'] : '';
$is_icon_placement_responsive = et_pb_responsive_options()->is_responsive_enabled( $this->props, 'icon_placement' );
$is_icon_placement_top = ! $is_icon_placement_responsive ? 'top' === $icon_placement : in_array( 'top', $icon_placement_values );
$animation = $this->props['animation'];
$animation_values = et_pb_responsive_options()->get_property_values( $this->props, 'animation' );
$animation_tablet = isset( $animation_values['tablet'] ) ? $animation_values['tablet'] : '';
$animation_phone = isset( $animation_values['phone'] ) ? $animation_values['phone'] : '';
$image_pathinfo = pathinfo( $image );
$is_image_svg = isset( $image_pathinfo['extension'] ) ? 'svg' === $image_pathinfo['extension'] : false;
$icon_selector = '%%order_class%% .et-pb-icon';
// Icon/image alignment is only rendered if icon/image placement is set to `top`. Note: due
// to responsive option, icon placement can be set to `left` on desktop but `top` on tablet;
// this case is considered truthy for $is_icon_placement_top
if ( $is_icon_placement_top ) {
$is_icon = 'on' === $use_icon;
$icon_alignment = $this->props['icon_alignment'];
$icon_alignment_values = et_pb_responsive_options()->get_property_values( $this->props, 'icon_alignment' );
$icon_alignment_last_edited = $this->props['icon_alignment_last_edited'];
$icon_alignment_margins = array(
'left' => 'auto auto auto 0',
'right' => 'auto 0 auto auto',
// Icon and image use different method of aligning and DOM structure. However, if the image's
// width is less than the wrapper width, it'll need icon's text-align style to align it
// Hence icon's alignment styling is always being outputted, while image is only when needed
$icon_alignment_selector = '%%order_class%% .et_pb_blurb_content';
$image_alignment_selector = '%%order_class%%.et_pb_blurb .et_pb_image_wrap';
if ( et_pb_get_responsive_status( $icon_alignment_last_edited ) && '' !== implode( '', $icon_alignment_values ) ) {
// Icon and less than wrapper width image alignment style
et_pb_responsive_options()->generate_responsive_css(
$icon_alignment_selector,
$image_alignment_values = array();
foreach( $icon_alignment_values as $breakpoint => $alignment ) {
$image_alignment_values[ $breakpoint ] = et_()->array_get(
et_pb_responsive_options()->generate_responsive_css(
$image_alignment_selector,
// Let default css handle the alignment if it isn't left or right
if ( in_array( $icon_alignment, array( 'left', 'right' ) ) ) {
$icon_alignment_prop_value = $is_icon ? $icon_alignment : et_()->array_get( $icon_alignment_margins, $icon_alignment, '' );
// Icon and less than wrapper width image alignment style
ET_Builder_Element::set_style( $render_slug, array(
'selector' => $icon_alignment_selector,
'declaration' => sprintf(
esc_html( $icon_alignment )
ET_Builder_Element::set_style( $render_slug, array(
'selector' => $image_alignment_selector,
'declaration' => sprintf(
esc_html( et_()->array_get( $icon_alignment_margins, $icon_alignment, '' ) )
if ( 'off' !== $use_icon_font_size ) {
$font_size_responsive_active = et_pb_get_responsive_status( $icon_font_size_last_edited );
$font_size_values = array(
'desktop' => $icon_font_size,
'tablet' => $font_size_responsive_active ? $icon_font_size_tablet : '',
'phone' => $font_size_responsive_active ? $icon_font_size_phone : '',
et_pb_generate_responsive_css( $font_size_values, $icon_selector, 'font-size', $render_slug );
if ( et_builder_is_hover_enabled( 'icon_font_size', $this->props ) ) {
ET_Builder_Element::set_style( $render_slug, array(
'selector' => $this->add_hover_to_order_class( $icon_selector ),
'declaration' => sprintf(
esc_html( $icon_font_size_hover )
if ( '' !== $image_max_width_tablet || '' !== $image_max_width_phone || '' !== $image_max_width || $is_image_svg ) {
// If size is given in px, we want to override parent width
false !== strpos( $image_max_width, 'px' ) ||
false !== strpos( $image_max_width_tablet, 'px' ) ||
false !== strpos( $image_max_width_phone, 'px' )
// SVG image overwrite. SVG image needs its value to be explicit
if ( '' === $image_max_width && $is_image_svg ) {
$image_max_width = '100%';
// Image max width selector.
$image_max_width_selectors = array();
$image_max_width_reset_selectors = array();
$image_max_width_reset_values = array();
$image_max_width_selector = $icon_placement === 'top' && $is_image_svg ? '%%order_class%% .et_pb_main_blurb_image' : '%%order_class%% .et_pb_main_blurb_image .et_pb_image_wrap';
foreach ( array( 'tablet', 'phone' ) as $device ) {
$device_icon_placement = 'tablet' === $device ? $icon_placement_tablet : $icon_placement_phone;
if ( empty( $device_icon_placement ) ) {
$image_max_width_selectors[ $device ] = 'top' === $device_icon_placement && $is_image_svg ? '%%order_class%% .et_pb_main_blurb_image' : '%%order_class%% .et_pb_main_blurb_image .et_pb_image_wrap';
$prev_icon_placement = 'tablet' === $device ? $icon_placement : $icon_placement_tablet;
if ( empty( $prev_icon_placement ) || $prev_icon_placement === $device_icon_placement || ! $is_image_svg ) {
// Image/icon placement setting is related to image width setting. In some cases,
// user uses different image/icon placement settings for each devices. We need to
// reset previous device image width styles to make it works with current style.
$image_max_width_reset_selectors[ $device ] = '%%order_class%% .et_pb_main_blurb_image';
$image_max_width_reset_values[ $device ] = array( 'width' => '32px' );
if ( 'top' === $device_icon_placement ) {
$image_max_width_reset_selectors[ $device ] = '%%order_class%% .et_pb_main_blurb_image .et_pb_image_wrap';
$image_max_width_reset_values[ $device ] = array( 'width' => 'auto' );
// Add image max width desktop selector if user sets different image/icon placement setting.
if ( ! empty( $image_max_width_selectors ) ) {
$image_max_width_selectors['desktop'] = $image_max_width_selector;
$image_max_width_property = ( $is_image_svg || $is_size_px ) ? 'width' : '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 : '',
$main_image_max_width_selector = $image_max_width_selector;
// Overwrite image max width if there are image max width selectors for different devices.
if ( ! empty( $image_max_width_selectors ) ) {
$main_image_max_width_selector = $image_max_width_selectors;
if ( ! empty( $image_max_width_selectors['tablet'] ) && empty( $image_max_width_values['tablet'] ) ) {
$image_max_width_values['tablet'] = $image_max_width_responsive_active ? esc_attr( et_pb_responsive_options()->get_any_value( $this->props, 'image_max_width_tablet', '100%', true ) ) : esc_attr( $image_max_width );
if ( ! empty( $image_max_width_selectors['phone'] ) && empty( $image_max_width_values['phone'] ) ) {
$image_max_width_values['phone'] = $image_max_width_responsive_active ? esc_attr( et_pb_responsive_options()->get_any_value( $this->props, 'image_max_width_phone', '100%', true ) ) : esc_attr( $image_max_width );
et_pb_responsive_options()->generate_responsive_css( $image_max_width_values, $main_image_max_width_selector, $image_max_width_property, $render_slug );
// Reset custom image max width styles.
if ( ! empty( $image_max_width_selectors ) && ! empty( $image_max_width_reset_selectors ) ) {
et_pb_responsive_options()->generate_responsive_css( $image_max_width_reset_values, $image_max_width_reset_selectors, $image_max_width_property, $render_slug, '', 'input' );
if ( '' !== $content_max_width_tablet || '' !== $content_max_width_phone || '' !== $content_max_width ) {
$content_max_width_responsive_active = et_pb_get_responsive_status( $content_max_width_last_edited );
$content_max_width_values = array(
'desktop' => $content_max_width,
'tablet' => $content_max_width_responsive_active ? $content_max_width_tablet : '',
'phone' => $content_max_width_responsive_active ? $content_max_width_phone : '',
et_pb_generate_responsive_css( $content_max_width_values, '%%order_class%% .et_pb_blurb_content', 'max-width', $render_slug );
if ( is_rtl() && 'left' === $icon_placement ) {
$icon_placement = 'right';
if ( is_rtl() && 'left' === $icon_placement_tablet ) {
$icon_placement_tablet = 'right';
if ( is_rtl() && 'left' === $icon_placement_phone ) {
$icon_placement_phone = 'right';
$title_tag = '' !== $url ? 'a' : 'span';
if ( 'a' === $title_tag ) {
$title_attrs['href'] = $url;
if ( 'on' === $url_new_window ) {
$title_attrs['target'] = '_blank';
$title = $multi_view->render_element( array(
'content' => '{{title}}',
'<%1$s class="et_pb_module_header">%2$s</%1$s>',
et_pb_process_header_level( $header_level, 'h4' ),
et_core_esc_previously( $title )
// Added for backward compatibility
if ( empty( $animation ) ) {
$image_classes = array( 'et-waypoint', 'et_pb_animation_' . $multi_view->get_value_desktop( 'animation', 'top' ) );
$animations = $multi_view->get_values( 'animation' );
foreach ( $animations as $mode => $animation ) {
if ( ! in_array( $mode, array( 'tablet', 'phone' ), true ) ) {
$image_classes[] = "et_pb_animation_{$animation}_{$mode}";
if ( 'off' === $use_icon ) {
$image = $multi_view->render_element( array(
'class' => implode( ' ', $image_classes ),
$icon_style = sprintf( 'color: %1$s;', esc_attr( $icon_color ) );
$icon_tablet_style = '' !== $icon_color_tablet ? sprintf( 'color: %1$s;', esc_attr( $icon_color_tablet ) ) : '';
$icon_phone_style = '' !== $icon_color_phone ? sprintf( 'color: %1$s;', esc_attr( $icon_color_phone ) ) : '';
if ( et_builder_is_hover_enabled( 'icon_color', $this->props ) ) {
$icon_style_hover = sprintf( 'color: %1$s;', esc_attr( $icon_color_hover ) );
if ( 'on' === $use_circle ) {
$icon_style .= sprintf( ' background-color: %1$s;', esc_attr( $circle_color ) );
$icon_tablet_style .= '' !== $circle_color_tablet ? sprintf( ' background-color: %1$s;', esc_attr( $circle_color_tablet ) ) : '';
$icon_phone_style .= '' !== $circle_color_phone ? sprintf( ' background-color: %1$s;', esc_attr( $circle_color_phone ) ) : '';
if ( et_builder_is_hover_enabled( 'circle_color', $this->props ) ) {
$icon_style_hover .= sprintf( ' background-color: %1$s;', esc_attr( $circle_color_hover ) );
if ( 'on' === $use_circle_border ) {
$icon_style .= sprintf( ' border-color: %1$s;', esc_attr( $circle_border_color ) );
$icon_tablet_style .= '' !== $circle_border_color_tablet ? sprintf( ' border-color: %1$s;', esc_attr( $circle_border_color_tablet ) ) : '';
$icon_phone_style .= '' !== $circle_border_color_phone ? sprintf( ' border-color: %1$s;', esc_attr( $circle_border_color_phone ) ) : '';
if ( et_builder_is_hover_enabled( 'circle_border_color', $this->props ) ) {
$icon_style_hover .= sprintf( ' border-color: %1$s;', esc_attr( $circle_border_color_hover ) );
ET_Builder_Element::set_style( $render_slug, array(
'selector' => $icon_selector,
'declaration' => $icon_style,
ET_Builder_Element::set_style( $render_slug, array(
'selector' => $icon_selector,
'declaration' => $icon_tablet_style,
'media_query' => ET_Builder_Element::get_media_query( 'max_width_980' ),
ET_Builder_Element::set_style( $render_slug, array(
'selector' => $icon_selector,
'declaration' => $icon_phone_style,
'media_query' => ET_Builder_Element::get_media_query( 'max_width_767' ),
if ( '' !== $icon_style_hover ) {
ET_Builder_Element::set_style( $render_slug, array(
'selector' => $this->add_hover_to_order_class( $icon_selector ),
'declaration' => $icon_style_hover,
$image_classes[] = 'et-pb-icon';
if ( 'on' === $use_circle ) {
$image_classes[] = 'et-pb-icon-circle';
if ( 'on' === $use_circle && 'on' === $use_circle_border ) {
$image_classes[] = 'et-pb-icon-circle-border';
$image = $multi_view->render_element( array(
'content' => '{{font_icon}}',
'class' => implode( ' ', $image_classes ),
// Images: Add CSS Filters and Mix Blend Mode rules (if set)
$generate_css_image_filters = '';
if ( $image && array_key_exists( 'icon_settings', $this->advanced_fields ) && array_key_exists( 'css', $this->advanced_fields['icon_settings'] ) ) {
$generate_css_image_filters = $this->generate_css_filters(
self::$data_utils->array_get( $this->advanced_fields['icon_settings']['css'], 'main', '%%order_class%%' )
$image = $image ? sprintf( '<span class="et_pb_image_wrap">%1$s</span>', $image ) : '';
$image = $image ? sprintf(
'<div class="et_pb_main_blurb_image%2$s">%1$s</div>',
'<a href="%1$s"%3$s>%2$s</a>',
( 'on' === $url_new_window ? ' target="_blank"' : '' )
esc_attr( $generate_css_image_filters )
$video_background = $this->video_background();
$parallax_image_background = $this->get_parallax_image_background();
$this->add_classname( array(
$this->get_text_orientation_classname(),
sprintf( ' et_pb_blurb_position_%1$s', esc_attr( $icon_placement ) ),
// Background layout class names.
$background_layout_class_names = et_pb_background_layout_options()->get_background_layout_class( $this->props );
$this->add_classname( $background_layout_class_names );
if ( ! empty( $icon_placement_tablet ) ) {
$this->add_classname( "et_pb_blurb_position_{$icon_placement_tablet}_tablet" );
if ( ! empty( $icon_placement_phone ) ) {
$this->add_classname( "et_pb_blurb_position_{$icon_placement_phone}_phone" );
// Background layout data attributes.
$data_background_layout = et_pb_background_layout_options()->get_background_layout_attrs( $this->props );
$content = $multi_view->render_element( array(
'content' => '{{content}}',
'class' => 'et_pb_blurb_description',
'<div%5$s class="%4$s"%8$s>
<div class="et_pb_blurb_content">
<div class="et_pb_blurb_container">
</div> <!-- .et_pb_blurb_content -->
</div> <!-- .et_pb_blurb -->',
et_core_esc_previously( $image ),
et_core_esc_previously( $title ),
$this->module_classname( $render_slug ),
$this->module_id(), // #5
$parallax_image_background,
et_core_esc_previously( $data_background_layout )
* Filter multi view value.
* @see ET_Builder_Module_Helper_MultiViewOptions::filter_value
* @param mixed $raw_value Props raw value.
* @type string $context Context param: content, attrs, visibility, classes.
* @type string $name Module options props name.
* @type string $mode Current data mode: desktop, hover, tablet, phone.