: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
'option_category' => 'configuration',
'on' => et_builder_i18n( 'Yes' ),
'off' => et_builder_i18n( 'No' ),
'description' => esc_html__( 'Turn the category links on or off.', 'et_builder' ),
'computed_affects' => array(
'toggle_slug' => 'elements',
'default_on_front' => 'on',
'mobile_options' => true,
'show_comments' => array(
'label' => esc_html__( 'Show Comment Count', 'et_builder' ),
'type' => 'yes_no_button',
'option_category' => 'configuration',
'on' => et_builder_i18n( 'Yes' ),
'off' => et_builder_i18n( 'No' ),
'description' => esc_html__( 'Turn comment count on and off.', 'et_builder' ),
'computed_affects' => array(
'toggle_slug' => 'elements',
'default_on_front' => 'off',
'mobile_options' => true,
'label' => esc_html__( 'Show Excerpt', 'et_builder' ),
'description' => esc_html__( 'Turn excerpt on and off.', 'et_builder' ),
'type' => 'yes_no_button',
'on' => et_builder_i18n( 'Yes' ),
'off' => et_builder_i18n( 'No' ),
'default_on_front' => 'on',
'computed_affects' => array(
'depends_show_if' => 'off',
'toggle_slug' => 'elements',
'option_category' => 'configuration',
'mobile_options' => true,
'show_pagination' => array(
'label' => esc_html__( 'Show Pagination', 'et_builder' ),
'type' => 'yes_no_button',
'option_category' => 'configuration',
'on' => et_builder_i18n( 'Yes' ),
'off' => et_builder_i18n( 'No' ),
'description' => esc_html__( 'Turn pagination on and off.', 'et_builder' ),
'computed_affects' => array(
'toggle_slug' => 'elements',
'default_on_front' => 'on',
'mobile_options' => true,
'offset_number' => array(
'label' => esc_html__( 'Post Offset Number', 'et_builder' ),
'option_category' => 'configuration',
'description' => esc_html__( 'Choose how many posts you would like to skip. These posts will not be shown in the feed.', 'et_builder' ),
'toggle_slug' => 'main_content',
'computed_affects' => array(
'label' => esc_html__( 'Featured Image Overlay', 'et_builder' ),
'type' => 'yes_no_button',
'option_category' => 'layout',
'off' => et_builder_i18n( 'Off' ),
'on' => et_builder_i18n( 'On' ),
'description' => esc_html__( 'If enabled, an overlay color and icon will be displayed when a visitors hovers over the featured image of a post.', 'et_builder' ),
'computed_affects' => array(
'tab_slug' => 'advanced',
'toggle_slug' => 'overlay',
'default_on_front' => 'off',
'overlay_icon_color' => array(
'label' => esc_html__( 'Overlay Icon Color', 'et_builder' ),
'depends_show_if' => 'on',
'tab_slug' => 'advanced',
'toggle_slug' => 'overlay',
'description' => esc_html__( 'Here you can define a custom color for the overlay icon', 'et_builder' ),
'mobile_options' => true,
'hover_overlay_color' => array(
'label' => esc_html__( 'Overlay Background Color', 'et_builder' ),
'depends_show_if' => 'on',
'tab_slug' => 'advanced',
'toggle_slug' => 'overlay',
'description' => esc_html__( 'Here you can define a custom color for the overlay', 'et_builder' ),
'mobile_options' => true,
'label' => esc_html__( 'Overlay Icon', 'et_builder' ),
'option_category' => 'configuration',
'class' => array( 'et-pb-font-icon' ),
'depends_show_if' => 'on',
'description' => esc_html__( 'Here you can define a custom icon for the overlay', 'et_builder' ),
'tab_slug' => 'advanced',
'toggle_slug' => 'overlay',
'computed_affects' => array(
'mobile_options' => true,
'masonry_tile_background_color' => array(
'label' => esc_html__( 'Grid Tile Background Color', 'et_builder' ),
'toggle_slug' => 'background',
'depends_show_if' => 'off',
'mobile_options' => true,
'computed_callback' => array( 'ET_Builder_Module_Blog', 'get_blog_posts' ),
'computed_depends_on' => array(
'computed_callback' => array( 'ET_Builder_Module_Blog', 'get_blog_posts' ),
'computed_affects' => array(
public function get_transition_fields_css_props() {
$fields = parent::get_transition_fields_css_props();
$fields['background_layout'] = array(
'color' => implode( ', ',
'%%order_class%% .entry-title',
'%%order_class%% .post-meta',
'%%order_class%% .post-content'
$fields['border_radii'] = array( 'border-radius' => self::$_->array_get( $this->advanced_fields, 'borders.default.css.main.border_radii' ) );
$fields['border_styles'] = array( 'border' => self::$_->array_get( $this->advanced_fields, 'borders.default.css.main.border_styles' ) );
$fields['border_radii_fullwidth'] = array( 'border-radius' => self::$_->array_get( $this->advanced_fields, 'borders.fullwidth.css.main.border_radii' ) );
$fields['border_styles_fullwidth'] = array( 'border' => self::$_->array_get( $this->advanced_fields, 'borders.fullwidth.css.main.border_styles' ) );
$fields['max_width'] = array( 'max-width' => '%%order_class%%' );
$fields['width'] = array( 'width' => '%%order_class%%' );
* Get blog posts for blog module
* @param array arguments that is being used by et_pb_blog
* @return string blog post markup
static function get_blog_posts( $args = array(), $conditional_tags = array(), $current_page = array() ) {
global $paged, $post, $wp_query, $et_fb_processing_shortcode_object, $et_pb_rendering_column_content;
if ( self::$rendering ) {
// We are trying to render a Blog module while a Blog module is already being rendered
// which means we have most probably hit an infinite recursion. While not necessarily
// the case, rendering a post which renders a Blog module which renders a post
// which renders a Blog module is not a sensible use-case.
$global_processing_original_value = $et_fb_processing_shortcode_object;
// Default params are combination of attributes that is used by et_pb_blog and
// conditional tags that need to be simulated (due to AJAX nature) by passing args
'use_current_loop' => 'off',
'include_categories' => '',
'use_manual_excerpt' => '',
'background_layout' => '',
'masonry_tile_background_color' => '',
'overlay_icon_color' => '',
'hover_overlay_color' => '',
'hover_icon_tablet' => '',
'hover_icon_phone' => '',
// WordPress' native conditional tag is only available during page load. It'll fail during component update because
// et_pb_process_computed_property() is loaded in admin-ajax.php. Thus, use WordPress' conditional tags on page load and
// rely to passed $conditional_tags for AJAX call
$is_front_page = et_fb_conditional_tag( 'is_front_page', $conditional_tags );
$is_single = et_fb_conditional_tag( 'is_single', $conditional_tags );
$et_is_builder_plugin_active = et_fb_conditional_tag( 'et_is_builder_plugin_active', $conditional_tags );
$post_id = isset( $current_page['id'] ) ? (int) $current_page['id'] : 0;
$container_is_closed = false;
// remove all filters from WP audio shortcode to make sure current theme doesn't add any elements into audio module
remove_all_filters( 'wp_audio_shortcode_library' );
remove_all_filters( 'wp_audio_shortcode' );
remove_all_filters( 'wp_audio_shortcode_class' );
$args = wp_parse_args( $args, $defaults );
if ( 'on' === $args['use_current_loop'] ) {
// Reset loop-affecting values to their defaults to simulate the current loop.
$reset_keys = array( 'post_type', 'include_categories' );
foreach ( $reset_keys as $key ) {
$args[ $key ] = $defaults[ $key ];
$processed_header_level = et_pb_process_header_level( $args['header_level'], 'h2' );
$processed_header_level = esc_html( $processed_header_level );
if ( 'on' === $args['use_overlay'] ) {
$overlay_output = ET_Builder_Module_Helper_Overlay::render( array(
'icon' => $args['hover_icon'],
'icon_tablet' => $args['hover_icon_tablet'],
'icon_phone' => $args['hover_icon_phone'],
$overlay_class = 'on' === $args['use_overlay'] ? ' et_pb_has_overlay' : '';
'posts_per_page' => intval( $args['posts_number'] ),
'post_status' => array( 'publish', 'private' ),
'post_type' => $args['post_type'],
if ( defined( 'DOING_AJAX' ) && isset( $current_page['paged'] ) ) {
$paged = intval( $current_page['paged'] ); //phpcs:ignore WordPress.Variables.GlobalVariables.OverrideProhibited
$paged = $is_front_page ? get_query_var( 'page' ) : get_query_var( 'paged' ); //phpcs:ignore WordPress.Variables.GlobalVariables.OverrideProhibited
// support pagination in VB
if ( isset( $args['__page'] ) ) {
$paged = $args['__page']; //phpcs:ignore WordPress.Variables.GlobalVariables.OverrideProhibited
$query_args['cat'] = implode( ',', self::filter_include_categories( $args['include_categories'], $post_id ) );
$query_args['paged'] = $paged;
if ( '' !== $args['offset_number'] && ! empty( $args['offset_number'] ) ) {
* Offset + pagination don't play well. Manual offset calculation required
* @see: https://codex.wordpress.org/Making_Custom_Queries_using_Offset_and_Pagination
$query_args['offset'] = ( ( $paged - 1 ) * intval( $args['posts_number'] ) ) + intval( $args['offset_number'] );
$query_args['offset'] = intval( $args['offset_number'] );
$main_query_post = ET_Post_Stack::get_main_post();
if ( null !== $main_query_post ) {
$query_args['post__not_in'][] = $main_query_post->ID;
$query = new WP_Query( $query_args );
// Keep page's $wp_query global
$wp_query_page = $wp_query;
// Turn page's $wp_query into this module's query
$wp_query = $query; //phpcs:ignore WordPress.Variables.GlobalVariables.OverrideProhibited
$wp_query->et_pb_blog_query = true;
// Manually set the max_num_pages to make the `next_posts_link` work
if ( '' !== $args['offset_number'] && ! empty( $args['offset_number'] ) ) {
$wp_query->found_posts = max( 0, $wp_query->found_posts - intval( $args['offset_number'] ) );
$wp_query->max_num_pages = ceil( $wp_query->found_posts / intval( $args['posts_number'] ) );
if ( $query->have_posts() ) {
if ( 'on' !== $args['fullwidth'] ) {
echo '<div class="et_pb_salvattore_content" data-columns>';
while( $query->have_posts() ) {
ET_Post_Stack::replace( $post );
global $et_fb_processing_shortcode_object;
$global_processing_original_value = $et_fb_processing_shortcode_object;
// reset the fb processing flag
$et_fb_processing_shortcode_object = false;
$width = 'on' === $args['fullwidth'] ? 1080 : 400;
$width = (int) apply_filters( 'et_pb_blog_image_width', $width );
$height = 'on' === $args['fullwidth'] ? 675 : 250;
$height = (int) apply_filters( 'et_pb_blog_image_height', $height );
$classtext = 'on' === $args['fullwidth'] ? 'et_pb_post_main_image' : '';
$titletext = get_the_title();
$alttext = get_post_meta( get_post_thumbnail_id(), '_wp_attachment_image_alt', true );
$thumbnail = get_thumbnail( $width, $height, $classtext, $alttext, $titletext, false, 'Blogimage' );
$thumb = $thumbnail["thumb"];
$no_thumb_class = '' === $thumb || 'off' === $args['show_thumbnail'] ? ' et_pb_no_thumb' : '';
$excerpt_length = '' !== $args['excerpt_length'] ? intval( $args['excerpt_length'] ) : 270;
$post_format = et_pb_post_format();
if ( in_array( $post_format, array( 'video', 'gallery' ) ) ) {
<article id="" <?php post_class( 'et_pb_post clearfix' . $no_thumb_class . $overlay_class ) ?>>
et_divi_post_format_content();
if ( ! in_array( $post_format, array( 'link', 'audio', 'quote' ) ) ) {
if ( 'video' === $post_format && false !== ( $first_video = et_get_first_video() ) ) :
$video_overlay = has_post_thumbnail() ? sprintf(
'<div class="et_pb_video_overlay" style="background-image: url(%1$s); background-size: cover;">
<div class="et_pb_video_overlay_hover">
<a href="#" class="et_pb_video_play"></a>
et_core_esc_previously( $thumb )
'<div class="et_main_video_container">
et_core_esc_previously( $video_overlay ),
et_core_esc_previously( $first_video )
elseif ( 'gallery' === $post_format ) :
et_pb_gallery_images( 'slider' );
elseif ( '' !== $thumb && 'on' === $args['show_thumbnail'] ) :
if ( 'on' !== $args['fullwidth'] ) echo '<div class="et_pb_image_container">'; ?>
<a href="<?php esc_url( the_permalink() ); ?>" class="entry-featured-image-url">
<?php print_thumbnail( $thumb, $thumbnail["use_timthumb"], $titletext, $width, $height ); ?>
<?php if ( 'on' === $args['use_overlay'] ) {
echo et_core_esc_previously( $overlay_output );
if ( 'on' !== $args['fullwidth'] ) echo '</div> <!-- .et_pb_image_container -->';
<?php if ( 'off' === $args['fullwidth'] || ! in_array( $post_format, array( 'link', 'audio', 'quote' ) ) ) { ?>
<?php if ( ! in_array( $post_format, array( 'link', 'audio' ) ) ) { ?>
<<?php echo et_core_esc_previously( $processed_header_level ); ?> class="entry-title"><a href="<?php esc_url( the_permalink() ); ?>"><?php the_title(); ?></a></<?php echo et_core_esc_previously( $processed_header_level ); ?>>
if ( 'on' === $args['show_author'] || 'on' === $args['show_date'] || 'on' === $args['show_categories'] || 'on' === $args['show_comments'] ) {
$author = 'on' === $args['show_author']
? et_get_safe_localization( sprintf( __( 'by %s', 'et_builder' ), '<span class="author vcard">' . et_pb_get_the_author_posts_link() . '</span>' ) )
$author_separator = 'on' === $args['show_author'] && 'on' === $args['show_date']
$date = 'on' === $args['show_date']
? et_get_safe_localization( sprintf( __( '%s', 'et_builder' ), '<span class="published">' . esc_html( get_the_date( $args['meta_date'] ) ) . '</span>' ) )
$date_separator = (( 'on' === $args['show_author'] || 'on' === $args['show_date'] ) && 'on' === $args['show_categories'] )
$categories = 'on' === $args['show_categories']
? et_builder_get_the_term_list(', ')
$categories_separator = (( 'on' === $args['show_author'] || 'on' === $args['show_date'] || 'on' === $args['show_categories'] ) && 'on' === $args['show_comments'])
$comments = 'on' === $args['show_comments']
? et_core_maybe_convert_to_utf_8( sprintf( esc_html( _nx( '%s Comment', '%s Comments', get_comments_number(), 'number of comments', 'et_builder' ) ), number_format_i18n( get_comments_number() ) ) )
printf( '<p class="post-meta">%1$s %2$s %3$s %4$s %5$s %6$s %7$s</p>',
et_core_esc_previously( $author ),
et_core_intentionally_unescaped( $author_separator, 'fixed_string' ),
et_core_esc_previously( $date ),
et_core_intentionally_unescaped( $date_separator, 'fixed_string' ),
et_core_esc_wp( $categories ),
et_core_intentionally_unescaped( $categories_separator, 'fixed_string' ),
et_core_esc_previously( $comments )
$post_content = et_strip_shortcodes( et_delete_post_first_video( get_the_content() ), true );
// reset the fb processing flag
$et_fb_processing_shortcode_object = false;
// set the flag to indicate that we're processing internal content
$et_pb_rendering_column_content = true;
// reset all the attributes required to properly generate the internal styles
ET_Builder_Element::clean_internal_modules_styles();
echo '<div class="post-content">';
if ( 'on' === $args['show_content'] ) {
// page builder doesn't support more tag, so display the_content() in case of post made with page builder
if ( et_pb_is_pagebuilder_used( get_the_ID() ) ) {
$more = 1; // phpcs:ignore WordPress.Variables.GlobalVariables.OverrideProhibited