: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
'hover_selector' => '%%order_class%% .et_pb_post',
echo '<div class="post-content">';
$multi_view->render_element(
'content' => '{{post_content}}',
'class' => 'post-content-inner',
'et_pb_blog_show_content' => array(
'hover_selector' => '%%order_class%% .et_pb_post',
$more = $multi_view->render_element( array(
'content' => esc_html__( 'read more', 'et_builder' ),
'href' => esc_url( get_permalink() ),
'hover_selector' => '%%order_class%% .et_pb_post',
echo et_core_esc_previously( $more );
<?php } // 'off' === $fullwidth || ! in_array( $post_format, array( 'link', 'audio', 'quote', 'gallery' ?>
</article> <!-- .et_pb_post -->
if ( 'off' === $fullwidth ) {
echo '</div><!-- .et_pb_salvattore_content -->';
if ( $multi_view->has_value( 'show_pagination', 'on' ) ) {
$multi_view->render_element( array(
'content' => $this->render_pagination( false ),
'show_pagination' => 'on',
'hover_selector' => '%%order_class%% .et_pb_post',
echo '</div> <!-- .et_pb_posts -->';
$container_is_closed = true;
} elseif ( $show_no_results_template ) {
echo self::get_no_results_template( et_core_intentionally_unescaped( $processed_header_level, 'fixed_string' ) );
unset( $wp_query->et_pb_blog_query );
$wp_the_query = $wp_query = $main_query;
// Restore stashed properties.
foreach ( $wp_query_props as $prop => $value ) {
$wp_query->{$prop} = $value;
$posts = ob_get_contents();
self::$rendering = false;
// Remove automatically added classnames
$this->remove_classname( array(
// Background layout data attributes.
$background_layout_props = array_merge( $this->props, array(
'background_layout' => $background_layout,
'background_layout_tablet' => $background_layout_tablet,
'background_layout_phone' => $background_layout_phone,
$data_background_layout = et_pb_background_layout_options()->get_background_layout_attrs( $background_layout_props );
if ( 'on' !== $fullwidth ) {
$this->add_classname( array(
'et_pb_blog_grid_wrapper',
// Remove auto-added classname for module wrapper because on grid mode these classnames
// are placed one level below module wrapper
$this->remove_classname( array(
'et_pb_section_parallax',
// Inner module wrapper classname
$inner_wrap_classname = array(
$this->get_text_orientation_classname(),
// Background layout class names.
$background_layout_class_names = et_pb_background_layout_options()->get_background_layout_class( $background_layout_props, false, true );
array_merge( $inner_wrap_classname, $background_layout_class_names );
if ( '' !== $video_background ) {
$inner_wrap_classname[] = 'et_pb_section_video';
$inner_wrap_classname[] = 'et_pb_preload';
if ( '' !== $parallax_image_background ) {
$inner_wrap_classname[] = 'et_pb_section_parallax';
'<div%4$s class="%5$s"%9$s>
<div class="et_pb_ajax_pagination_container">
esc_attr( implode( ' ', $inner_wrap_classname ) ),
( ! $container_is_closed ? '</div> <!-- .et_pb_posts -->' : '' ),
$this->module_classname( $render_slug ), // #5
$parallax_image_background,
$this->drop_shadow_back_compatibility( $render_slug ),
et_core_esc_previously( $data_background_layout )
$this->add_classname( array(
"et_pb_bg_layout_{$background_layout}",
$this->get_text_orientation_classname(),
if ( ! empty( $background_layout_tablet ) ) {
$this->add_classname( "et_pb_bg_layout_{$background_layout_tablet}_tablet" );
if ( ! empty( $background_layout_phone ) ) {
$this->add_classname( "et_pb_bg_layout_{$background_layout_phone}_phone" );
'<div%4$s class="%1$s"%8$s>
<div class="et_pb_ajax_pagination_container">
$this->module_classname( $render_slug ),
( ! $container_is_closed ? '</div> <!-- .et_pb_posts -->' : '' ),
$parallax_image_background,
$this->drop_shadow_back_compatibility( $render_slug ),
et_core_esc_previously( $data_background_layout )
$wp_filter = $wp_filter_cache; // phpcs:ignore WordPress.Variables.GlobalVariables.OverrideProhibited
// Restore global $post into its original state when et_pb_blog shortcode ends to avoid
// the rest of the page uses incorrect global $post variable
$post = $post_cache; // phpcs:ignore WordPress.Variables.GlobalVariables.OverrideProhibited
public function process_box_shadow( $function_name ) {
if ( isset( $this->props['fullwidth'] ) && $this->props['fullwidth'] === 'off' ) {
// Only override 'default' box shadow because we also defined
// box shadow settings for the image.
$this->advanced_fields['box_shadow']['default'] = array(
'main' => '%%order_class%% article.et_pb_post',
'hover' => '%%order_class%% article.et_pb_post:hover',
parent::process_box_shadow( $function_name );
* Since the styling file is not updated until the author updates the page/post,
* we should keep the drop shadow visible.
* @param string $functions_name
private function drop_shadow_back_compatibility( $functions_name ) {
$utils = ET_Core_Data_Utils::instance();
version_compare( $utils->array_get( $atts, '_builder_version', '3.0.93' ), '3.0.94', 'lt' )
'on' !== $utils->array_get( $atts, 'fullwidth' )
'on' === $utils->array_get( $atts, 'use_dropshadow' )
$class = self::get_module_order_class( $functions_name );
sprintf( '.%1$s article.et_pb_post { box-shadow: 0 1px 5px rgba(0,0,0,.1) }', esc_html( $class ) )
* 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.
* @type string $attr_key Attribute key for attrs context data. Example: src, class, etc.
* @type string $attr_sub_key Attribute sub key that availabe when passing attrs value as array such as styes. Example: padding-top, margin-botton, etc.
* @param ET_Builder_Module_Helper_MultiViewOptions $multi_view Multiview object instance.
public function multi_view_filter_value( $raw_value, $args, $multi_view ) {
$name = isset( $args['name'] ) ? $args['name'] : '';
$mode = isset( $args['mode'] ) ? $args['mode'] : '';
$context = isset( $args['context'] ) ? $args['context'] : '';
if ( 'post_content' === $name && 'content' === $context ) {
global $et_pb_rendering_column_content;
$post_content = et_strip_shortcodes( et_delete_post_first_video( get_the_content() ), true );
$et_pb_rendering_column_content = true;
if ( 'on' === $raw_value ) {
if ( et_pb_is_pagebuilder_used( get_the_ID() ) ) {
$more = 1; // phpcs:ignore WordPress.Variables.GlobalVariables.OverrideProhibited
$raw_value = et_core_intentionally_unescaped( apply_filters( 'the_content', $post_content ), 'html' );
$more = null; // phpcs:ignore WordPress.Variables.GlobalVariables.OverrideProhibited
$raw_value = et_core_intentionally_unescaped( apply_filters( 'the_content', et_delete_post_first_video( get_the_content( esc_html__( 'read more...', 'et_builder' ) ) ) ), 'html' );
$use_manual_excerpt = isset( $this->props['use_manual_excerpt'] ) ? $this->props['use_manual_excerpt'] : 'off';
$excerpt_length = isset( $this->props['excerpt_length'] ) ? $this->props['excerpt_length'] : 270;
if ( has_excerpt() && 'off' !== $use_manual_excerpt ) {
* Filters the displayed post excerpt.
* @param string $post_excerpt The post excerpt.
$raw_value = apply_filters( 'the_excerpt', get_the_excerpt() );
$raw_value = et_core_intentionally_unescaped( wpautop( et_delete_post_first_video( strip_shortcodes( truncate_post( $excerpt_length, false, '', true ) ) ) ), 'html' );
$et_pb_rendering_column_content = false;
} else if ( 'show_content' === $name && 'visibility' === $context ) {
$raw_value = $multi_view->has_value( $name, 'on', $mode, true ) ? 'on' : $raw_value;
} else if ( 'post_meta_removes' === $name && 'content' === $context ) {
$post_meta_remove_keys = array(
'show_categories' => true,
$post_meta_removes = explode( ',', $raw_value );
if ( $post_meta_removes ) {
foreach ( $post_meta_removes as $post_meta_remove ) {
unset( $post_meta_remove_keys[ $post_meta_remove ] );
$post_meta_datas = array();
if ( isset( $post_meta_remove_keys['show_author'] ) ) {
$post_meta_datas[] = et_get_safe_localization( sprintf( __( 'by %s', 'et_builder' ), '<span class="author vcard">' . et_pb_get_the_author_posts_link() . '</span>' ) );
if ( isset( $post_meta_remove_keys['show_date'] ) ) {
$post_meta_datas[] = et_get_safe_localization( sprintf( __( '%s', 'et_builder' ), '<span class="published">' . esc_html( get_the_date( $this->props['meta_date'] ) ) . '</span>' ) );
if ( isset( $post_meta_remove_keys['show_categories'] ) ) {
$post_meta_datas[] = et_builder_get_the_term_list( ', ' );
if ( isset( $post_meta_remove_keys['show_comments'] ) ) {
$post_meta_datas[] = sprintf( esc_html( _nx( '%s Comment', '%s Comments', get_comments_number(), 'number of comments', 'et_builder' ) ), number_format_i18n( get_comments_number() ) );
$raw_value = implode( ' | ', $post_meta_datas );
new ET_Builder_Module_Blog;