Make WordPress Core


Ignore:
Timestamp:
04/15/2021 12:08:36 AM (3 years ago)
Author:
peterwilsoncc
Message:

Editor: Update of @wordpress npm packages for 5.5.4.

File:
1 edited

Legend:

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

    r48177 r50722  
    126126            $trimmed_excerpt = get_the_excerpt( $post );
    127127
     128            if ( post_password_required( $post ) ) {
     129                $trimmed_excerpt = __( 'This content is password protected.' );
     130            }
     131
    128132            $list_items_markup .= sprintf(
    129133                '<div class="wp-block-latest-posts__post-excerpt">%1$s</div>',
     
    134138        if ( isset( $attributes['displayPostContent'] ) && $attributes['displayPostContent']
    135139            && isset( $attributes['displayPostContentRadio'] ) && 'full_post' === $attributes['displayPostContentRadio'] ) {
     140
     141            $post_content = wp_kses_post( html_entity_decode( $post->post_content, ENT_QUOTES, get_option( 'blog_charset' ) ) );
     142
     143            if ( post_password_required( $post ) ) {
     144                $post_content = __( 'This content is password protected.' );
     145            }
     146
    136147            $list_items_markup .= sprintf(
    137148                '<div class="wp-block-latest-posts__post-full-content">%1$s</div>',
    138                 wp_kses_post( html_entity_decode( $post->post_content, ENT_QUOTES, get_option( 'blog_charset' ) ) )
     149                $post_content
    139150            );
    140151        }
Note: See TracChangeset for help on using the changeset viewer.