Editor: Ensure latest comments can only be viewed from public posts.
Props: poena, xknown. Built from https://develop.svn.wordpress.org/trunk@47984 git-svn-id: http://core.svn.wordpress.org/trunk@47752 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9524b335c7
commit
c075eec24f
|
@ -597,7 +597,12 @@ function comment_date( $format = '', $comment_ID = 0 ) {
|
||||||
*/
|
*/
|
||||||
function get_comment_excerpt( $comment_ID = 0 ) {
|
function get_comment_excerpt( $comment_ID = 0 ) {
|
||||||
$comment = get_comment( $comment_ID );
|
$comment = get_comment( $comment_ID );
|
||||||
|
|
||||||
|
if ( ! post_password_required( $comment->comment_post_ID ) ) {
|
||||||
$comment_text = strip_tags( str_replace( array( "\n", "\r" ), ' ', $comment->comment_content ) );
|
$comment_text = strip_tags( str_replace( array( "\n", "\r" ), ' ', $comment->comment_content ) );
|
||||||
|
} else {
|
||||||
|
$comment_text = __( 'Password protected' );
|
||||||
|
}
|
||||||
|
|
||||||
/* translators: Maximum number of words used in a comment excerpt. */
|
/* translators: Maximum number of words used in a comment excerpt. */
|
||||||
$comment_excerpt_length = intval( _x( '20', 'comment_excerpt_length' ) );
|
$comment_excerpt_length = intval( _x( '20', 'comment_excerpt_length' ) );
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.5-alpha-47952';
|
$wp_version = '5.5-alpha-47984';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue