Editor: Update of @wordpress npm packages for 5.4.5.

Built from https://develop.svn.wordpress.org/branches/5.4@50723


git-svn-id: http://core.svn.wordpress.org/branches/5.4@50332 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Peter Wilson 2021-04-15 00:13:59 +00:00
parent e22ba4ed45
commit d53989d502
1 changed files with 12 additions and 1 deletions

View File

@ -107,6 +107,10 @@ function render_block_core_latest_posts( $attributes ) {
$trimmed_excerpt = get_the_excerpt( $post );
if ( post_password_required( $post ) ) {
$trimmed_excerpt = __( 'This content is password protected.' );
}
$list_items_markup .= sprintf(
'<div class="wp-block-latest-posts__post-excerpt">%1$s',
$trimmed_excerpt
@ -127,9 +131,16 @@ function render_block_core_latest_posts( $attributes ) {
if ( isset( $attributes['displayPostContent'] ) && $attributes['displayPostContent']
&& isset( $attributes['displayPostContentRadio'] ) && 'full_post' === $attributes['displayPostContentRadio'] ) {
$post_content = wp_kses_post( html_entity_decode( $post->post_content, ENT_QUOTES, get_option( 'blog_charset' ) ) );
if ( post_password_required( $post ) ) {
$post_content = __( 'This content is password protected.' );
}
$list_items_markup .= sprintf(
'<div class="wp-block-latest-posts__post-full-content">%1$s</div>',
wp_kses_post( html_entity_decode( $post->post_content, ENT_QUOTES, get_option( 'blog_charset' ) ) )
$post_content
);
}