Administration: Add `.protected-post-excerpt` class to password-protected post excerpts in the posts list.

Props Soean, mp518, slaFFik, SergeyBiryukov.
Fixes #41426.
Built from https://develop.svn.wordpress.org/trunk@41770


git-svn-id: http://core.svn.wordpress.org/trunk@41604 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2017-10-05 02:50:46 +00:00
parent 2e8615f21e
commit 561bde29c7
2 changed files with 6 additions and 2 deletions

View File

@ -949,7 +949,11 @@ class WP_Posts_List_Table extends WP_List_Table {
echo "</strong>\n";
if ( ! is_post_type_hierarchical( $this->screen->post_type ) && 'excerpt' === $mode && current_user_can( 'read_post', $post->ID ) ) {
echo esc_html( get_the_excerpt() );
if ( post_password_required( $post ) ) {
echo '<span class="protected-post-excerpt">' . esc_html( get_the_excerpt() ) . '</span>';
} else {
echo esc_html( get_the_excerpt() );
}
}
get_inline_data( $post );

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.9-alpha-41769';
$wp_version = '4.9-alpha-41770';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.