Posts: Correctly pass $post to post_password_required() in get_the_excerpt().
Corrects the relevant test. Props sebastian.pisula for initial patch. Fixes #35486. Built from https://develop.svn.wordpress.org/trunk@36329 git-svn-id: http://core.svn.wordpress.org/trunk@36296 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -372,7 +372,7 @@ function get_the_excerpt( $post = null ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
if ( post_password_required() ) {
|
||||
if ( post_password_required( $post ) ) {
|
||||
return __( 'There is no excerpt because this is a protected post.' );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user