Make WordPress Core

Changeset 50720


Ignore:
Timestamp:
04/14/2021 11:50:19 PM (4 years ago)
Author:
peterwilsoncc
Message:

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.

File:
1 edited

Legend:

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

    r49226 r50720  
    135135            $trimmed_excerpt = get_the_excerpt( $post );
    136136
     137            if ( post_password_required( $post ) ) {
     138                $trimmed_excerpt = __( 'This content is password protected.' );
     139            }
     140
    137141            $list_items_markup .= sprintf(
    138142                '<div class="wp-block-latest-posts__post-excerpt">%1$s</div>',
     
    143147        if ( isset( $attributes['displayPostContent'] ) && $attributes['displayPostContent']
    144148            && isset( $attributes['displayPostContentRadio'] ) && 'full_post' === $attributes['displayPostContentRadio'] ) {
     149
     150            $post_content = wp_kses_post( html_entity_decode( $post->post_content, ENT_QUOTES, get_option( 'blog_charset' ) ) );
     151
     152            if ( post_password_required( $post ) ) {
     153                $post_content = __( 'This content is password protected.' );
     154            }
     155
    145156            $list_items_markup .= sprintf(
    146157                '<div class="wp-block-latest-posts__post-full-content">%1$s</div>',
    147                 wp_kses_post( html_entity_decode( $post->post_content, ENT_QUOTES, get_option( 'blog_charset' ) ) )
     158                $post_content
    148159            );
    149160        }
Note: See TracChangeset for help on using the changeset viewer.