: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
case 'post_comment_count':
$link = $_->array_get( $settings, 'link_to_comments_page', $def( $post_id, $name, 'link_to_comments_page' ) );
$content = esc_html( get_comments_number( $post_id ) );
'<a href="%1$s">%2$s</a>',
esc_url( get_comments_link( $post_id ) ),
et_core_esc_previously( et_builder_wrap_dynamic_content( $post_id, $name, $content, $settings ) )
case 'post_categories': // Intentional fallthrough.
$overrides_map = array( 'category' => 'post_categories', 'post_tag' => 'post_tags' );
$post_taxonomies = et_builder_get_taxonomy_types( get_post_type( $post_id ) );
$taxonomy = $_->array_get( $settings, 'category_type', '' );
if ( in_array( $taxonomy, array( 'et_header_layout_category', 'et_body_layout_category', 'et_footer_layout_category' ) ) ) {
// TB layouts were storing an invalid taxonomy in <= 4.0.3 so we have to correct it:
$taxonomy = $def( $post_id, $name, 'category_type' );
if ( ! isset( $post_taxonomies[ $taxonomy ] ) ) {
$link = $_->array_get( $settings, 'link_to_term_page', $def( $post_id, $name, 'link_to_category_page' ) );
$separator = $_->array_get( $settings, 'separator', $def( $post_id, $name, 'separator' ) );
$separator = ! empty( $separator ) ? $separator : $def( $post_id, $name, 'separator' );
$ids_key = isset( $overrides_map[ $taxonomy ] ) ? $overrides_map[ $taxonomy ] : '';
$ids = isset( $overrides[ $ids_key ] ) ? array_filter( array_map( 'intval', explode( ',', $overrides[ $ids_key ] ) ) ) : array();
$terms = ! empty( $ids ) ? get_terms( array( 'taxonomy' => $taxonomy, 'include' => $ids ) ) : get_the_terms( $post_id, $taxonomy );
if ( is_array( $terms ) ) {
$content = et_builder_list_terms( $terms, $link, $separator );
$text = $_->array_get( $settings, 'text', $def( $post_id, $name, 'text' ) );
$custom_text = $_->array_get( $settings, 'custom_text', $def( $post_id, $name, 'custom_text' ) );
$label = 'custom' === $text ? $custom_text : get_the_title( $post_id );
'<a href="%1$s">%2$s</a>',
esc_url( get_permalink( $post_id ) ),
$name_format = $_->array_get( $settings, 'name_format', $def( $post_id, $name, 'name_format' ) );
$link = $_->array_get( $settings, 'link', $def( $post_id, $name, 'link' ) );
$link_destination = $_->array_get( $settings, 'link_destination', $def( $post_id, $name, 'link_destination' ) );
$link_target = 'author_archive' === $link_destination ? '_self' : '_blank';
$label = $author->display_name;
$label = $author->first_name . ' ' . $author->last_name;
$label = $author->last_name . ', ' . $author->first_name;
$label = $author->first_name;
$label = $author->last_name;
$label = $author->nickname;
$label = $author->user_login;
switch ( $link_destination ) {
$url = get_author_posts_url( $author->ID );
$url = $author->user_url;
$content = esc_html( $label );
if ( $link && ! empty( $url ) ) {
'<a href="%1$s" target="%2$s">%3$s</a>',
esc_attr( $link_target ),
et_core_esc_previously( $content )
$content = et_core_intentionally_unescaped( $author->description, 'cap_based_sanitized' );
$content = et_core_intentionally_unescaped( term_description(), 'cap_based_sanitized' );
$content = esc_html( get_bloginfo( 'name' ) );
$content = esc_html( get_bloginfo( 'description' ) );
$format = $_->array_get( $settings, 'date_format', $def( $post_id, $name, 'date_format' ) );
$custom_format = $_->array_get( $settings, 'custom_date_format', $def( $post_id, $name, 'custom_date_format' ) );
if ( 'default' === $format ) {
$format = get_option( 'date_format' );
if ( 'custom' === $format ) {
$format = $custom_format;
$content = esc_html( date_i18n( $format ) );
$content = esc_url( get_permalink( $post_id ) );
$content = esc_url( get_author_posts_url( $author->ID ) );
$content = esc_url( home_url( '/' ) );
case 'any_post_link_url':
$selected_post_id = $_->array_get( $settings, 'post_id', $def( $post_id, $name, 'post_id' ) );
$content = esc_url( get_permalink( $selected_post_id ) );
case 'product_reviews_tab':
$content = '#product_reviews_tab';
case 'post_featured_image':
$is_blog_query = isset( $wp_query->et_pb_blog_query ) && $wp_query->et_pb_blog_query;
if ( isset( $overrides[ $name ] ) ) {
$id = (int) $overrides[ $name ];
$content = wp_get_attachment_image_url( $id, 'full' );
if ( ! $is_blog_query && ( is_category() || is_tag() || is_tax() ) ) {
$term_id = (int) get_queried_object_id();
$attachment_id = (int) get_term_meta( $term_id, 'thumbnail_id', true );
$url = wp_get_attachment_image_url( $attachment_id, 'full' );
$content = $url ? esc_url( $url ) : '';
$url = get_the_post_thumbnail_url( $post_id, 'full' );
$content = $url ? esc_url( $url ) : '';
case 'post_featured_image_alt_text':
$is_blog_query = isset( $wp_query->et_pb_blog_query ) && $wp_query->et_pb_blog_query;
if ( isset( $overrides[ $name ] ) ) {
$id = (int) $overrides[ $name ];
$img_alt = $id ? get_post_meta( $id, '_wp_attachment_image_alt', true ) : '';
$content = $img_alt ? esc_attr( $img_alt ) : '';
if ( ! $is_blog_query && ( is_category() || is_tag() || is_tax() ) ) {
$term_id = (int) get_queried_object_id();
$attachment_id = (int) get_term_meta( $term_id, 'thumbnail_id', true );
$img_alt = $attachment_id ? get_post_meta( $attachment_id, '_wp_attachment_image_alt', true ) : '';
$content = $img_alt ? esc_attr( $img_alt ) : '';
$img_alt = get_post_thumbnail_id() ? get_post_meta( get_post_thumbnail_id(), '_wp_attachment_image_alt', true ) : '';
$content = $img_alt ? esc_attr( $img_alt ) : '';
case 'post_featured_image_title_text':
$is_blog_query = isset( $wp_query->et_pb_blog_query ) && $wp_query->et_pb_blog_query;
if ( isset( $overrides[ $name ] ) ) {
$id = (int) $overrides[ $name ];
$img_title = $id ? get_the_title( $id ) : '';
$content = $img_title ? esc_attr( $img_title ) : '';
if ( ! $is_blog_query && ( is_category() || is_tag() || is_tax() ) ) {
$term_id = (int) get_queried_object_id();
$attachment_id = (int) get_term_meta( $term_id, 'thumbnail_id', true );
$img_title = $attachment_id ? get_the_title( $attachment_id ) : '';
$content = $img_title ? esc_attr( $img_title ) : '';
$img_title = get_post_thumbnail_id() ? get_the_title( get_post_thumbnail_id() ) : '';
$content = $img_title ? esc_attr( $img_title ) : '';
case 'post_author_profile_picture':
$content = get_avatar_url( $author->ID );
$logo = et_get_option( $shortname . '_logo' );
if ( ! empty( $logo ) ) {
$content = esc_url( $logo );
case 'product_breadcrumb':
$dynamic_product = ET_Builder_Module_Helper_Woocommerce_Modules::get_product( $post_id );
if ( $dynamic_product ) {
$content = ET_Builder_Module_Woocommerce_Breadcrumb::get_breadcrumb( array(
'product' => $dynamic_product->get_id(),
$dynamic_product = ET_Builder_Module_Helper_Woocommerce_Modules::get_product( $post_id );
if ( $dynamic_product ) {
$content = ET_Builder_Module_Woocommerce_Price::get_price( array(
'product' => $dynamic_product->get_id(),
case 'product_description':
$dynamic_product = ET_Builder_Module_Helper_Woocommerce_Modules::get_product( $post_id );
if ( $dynamic_product ) {
$content = ET_Builder_Module_Woocommerce_Description::get_description( array(
'product' => $dynamic_product->get_id(),
'description_type' => 'description',
case 'product_short_description':
$dynamic_product = ET_Builder_Module_Helper_Woocommerce_Modules::get_product( $post_id );
if ( $dynamic_product ) {
$content = ET_Builder_Module_Woocommerce_Description::get_description( array(
'product' => $dynamic_product->get_id(),
'description_type' => 'short_description',
case 'product_reviews_count':
$dynamic_product = ET_Builder_Module_Helper_Woocommerce_Modules::get_product( $post_id );
if ( $dynamic_product ) {
$content = $dynamic_product->get_review_count();
$dynamic_product = ET_Builder_Module_Helper_Woocommerce_Modules::get_product( $post_id );
if ( $dynamic_product ) {
$content = $dynamic_product->get_sku();
$dynamic_product = ET_Builder_Module_Helper_Woocommerce_Modules::get_product( $post_id );
if ( ! $dynamic_product ) {
// Return early if comments are closed.
if ( ! comments_open( $dynamic_product->get_id() ) ) {
// Product description refers to Product short description.
// Product short description is nothing but post excerpt.
$args = array( 'post_id' => $dynamic_product->get_id() );
$comments = get_comments( $args );
$total_pages = get_comment_pages_count( $comments );
$content = wp_list_comments( array(
'callback' => 'woocommerce_comments',
// Pass $dynamic_product, $reviews to unify the flow of data.
$reviews_title = ET_Builder_Module_Helper_Woocommerce_Modules::get_reviews_title( $dynamic_product );
$reviews_comment_form = ET_Builder_Module_Helper_Woocommerce_Modules::get_reviews_comment_form( $dynamic_product, $comments );
$no_reviews_text = sprintf(
'<p class="woocommerce-noreviews">%s</p>',
esc_html__( 'There are no reviews yet.', 'et_builder' )
$no_reviews = is_array( $comments ) && count( $comments ) > 0 ? '' : $no_reviews_text;
$page = get_query_var( 'cpage' );
'base' => add_query_arg( 'cpage', '%#%' ),
'add_fragment' => '#comments',
if ( $wp_rewrite->using_permalinks() ) {
$args['base'] = user_trailingslashit( trailingslashit( get_permalink() ) . $wp_rewrite->comments_pagination_base . '-%#%', 'commentpaged' );
$pagination = paginate_links( $args );
$pagination = paginate_comments_links( array(
<div id="reviews" class="woocommerce-Reviews">
<h2 class="woocommerce-Reviews-title">
<nav class="woocommerce-pagination">
<div id="review_form_wrapper">
et_core_esc_previously( $reviews_title ),
et_core_esc_previously( $content ),
et_core_esc_previously( $reviews_comment_form ),
et_core_esc_previously( $no_reviews ),
et_core_esc_previously( $pagination )
case 'product_additional_information':
$dynamic_product = ET_Builder_Module_Helper_Woocommerce_Modules::get_product( $post_id );
if ( $dynamic_product ) {
$content = ET_Builder_Module_Woocommerce_Additional_Info::get_additional_info( array(
'product' => $dynamic_product->get_id(),
$meta_key = $_->array_get( $settings, 'meta_key' );