mirror of
git://develop.git.wordpress.org/
synced 2025-02-19 22:24:46 +01:00
Editor: Finalise update of @wordpress npm packages for 5.7.1.
Commit built files stored in repo following package updates. Props gziolo, noisysocks, isabel_brison, peterwilsoncc. Follow up to [50719]. Fixes #52912. git-svn-id: https://develop.svn.wordpress.org/branches/5.7@50720 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
7bba4c774f
commit
7ef3d73455
@ -134,6 +134,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</div>',
|
||||
$trimmed_excerpt
|
||||
@ -142,9 +146,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…
x
Reference in New Issue
Block a user