Make WordPress Core


Ignore:
Timestamp:
04/15/2021 12:12:26 AM (5 years ago)
Author:
peterwilsoncc
Message:

Editor: Update of @wordpress npm packages for 5.4.5.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/5.4/src/wp-includes/blocks/latest-posts.php

    r47408 r50723  
    107107
    108108                        $trimmed_excerpt = get_the_excerpt( $post );
     109
     110                        if ( post_password_required( $post ) ) {
     111                                $trimmed_excerpt = __( 'This content is password protected.' );
     112                        }
    109113
    110114                        $list_items_markup .= sprintf(
     
    128132                if ( isset( $attributes['displayPostContent'] ) && $attributes['displayPostContent']
    129133                        && isset( $attributes['displayPostContentRadio'] ) && 'full_post' === $attributes['displayPostContentRadio'] ) {
     134
     135                        $post_content = wp_kses_post( html_entity_decode( $post->post_content, ENT_QUOTES, get_option( 'blog_charset' ) ) );
     136
     137                        if ( post_password_required( $post ) ) {
     138                                $post_content = __( 'This content is password protected.' );
     139                        }
     140
    130141                        $list_items_markup .= sprintf(
    131142                                '<div class="wp-block-latest-posts__post-full-content">%1$s</div>',
    132                                 wp_kses_post( html_entity_decode( $post->post_content, ENT_QUOTES, get_option( 'blog_charset' ) ) )
     143                                $post_content
    133144                        );
    134145                }
Note: See TracChangeset for help on using the changeset viewer.