Editor: Update of @wordpress npm packages for 5.3.7.
Built from https://develop.svn.wordpress.org/branches/5.3@50724 git-svn-id: http://core.svn.wordpress.org/branches/5.3@50333 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
40a294d21e
commit
7adb8b4e4d
|
@ -53,11 +53,16 @@ function render_block_core_latest_posts( $attributes ) {
|
|||
if ( isset( $attributes['displayPostContent'] ) && $attributes['displayPostContent']
|
||||
&& isset( $attributes['displayPostContentRadio'] ) && 'excerpt' === $attributes['displayPostContentRadio'] ) {
|
||||
$post_excerpt = $post->post_excerpt;
|
||||
|
||||
if ( ! ( $post_excerpt ) ) {
|
||||
$post_excerpt = $post->post_content;
|
||||
}
|
||||
$trimmed_excerpt = esc_html( wp_trim_words( $post_excerpt, $excerpt_length, ' … ' ) );
|
||||
|
||||
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
|
||||
|
@ -78,9 +83,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