Administration: Add .protected-post-excerpt
class to password-protected post excerpts in the posts list.
Props Soean, mp518, slaFFik, SergeyBiryukov. Fixes #41426. git-svn-id: https://develop.svn.wordpress.org/trunk@41770 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
86125a6a2d
commit
eb4f4bc87e
@ -949,7 +949,11 @@ class WP_Posts_List_Table extends WP_List_Table {
|
|||||||
echo "</strong>\n";
|
echo "</strong>\n";
|
||||||
|
|
||||||
if ( ! is_post_type_hierarchical( $this->screen->post_type ) && 'excerpt' === $mode && current_user_can( 'read_post', $post->ID ) ) {
|
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 );
|
get_inline_data( $post );
|
||||||
|
Loading…
Reference in New Issue
Block a user