%2$s
', $post['postLink'], $title ); $meta_data = ''; if ( isset( $attributes['displayPostDate'] ) && $attributes['displayPostDate'] && 'horizontal' === $block_style ) { $meta_data .= sprintf( '', esc_html( $post['date'] ), esc_html( $post['dateReadable'] ) ); } if ( ! empty( $attributes['displayPostAuthor'] ) ) { if ( ! get_the_author_meta( 'description' ) && post_type_supports( get_post_type(), 'author' ) ) { $meta_data .= ''; } } if ( ! empty( $attributes['displayPostCategories'] ) ) { /* translators: used between list items, there is a space after the comma. */ $categories_list = get_the_category_list( __( ', ' ), '', $post['ID'] ); if ( $categories_list ) { $meta_data .= sprintf( '%s ', $categories_list // phpcs:ignore WordPress.Security.EscapeOutput ); } } if ( ! empty( $meta_data ) ) { $list_items_markup .= sprintf( '', $meta_data ); } if ( isset( $attributes['displayPostContent'] ) && $attributes['displayPostContent'] ) { $post_excerpt = $post['postExcerpt']; $trimmed_excerpt = esc_html( wp_trim_words( $post_excerpt, $attributes['excerptLength'], ' … ' ) ); $list_items_markup .= '%1$s
', esc_html( $trimmed_excerpt ) ); if ( isset( $attributes['displayPostLink'] ) && $attributes['displayPostLink'] ) { $list_items_markup .= sprintf( '', esc_url( $post['postLink'] ), esc_html( $attributes['postLink'] ), esc_html( $post['title'] ) ); } $list_items_markup .= '