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:
parent
e22ba4ed45
commit
d53989d502
|
@ -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
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue