From 561bde29c71d5e841c841c820a53d9662147be14 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 5 Oct 2017 02:50:46 +0000 Subject: [PATCH] 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 --- wp-admin/includes/class-wp-posts-list-table.php | 6 +++++- wp-includes/version.php | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/class-wp-posts-list-table.php b/wp-admin/includes/class-wp-posts-list-table.php index 5395a0beac..5988c3eaca 100644 --- a/wp-admin/includes/class-wp-posts-list-table.php +++ b/wp-admin/includes/class-wp-posts-list-table.php @@ -949,7 +949,11 @@ class WP_Posts_List_Table extends WP_List_Table { echo "\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 '' . esc_html( get_the_excerpt() ) . ''; + } else { + echo esc_html( get_the_excerpt() ); + } } get_inline_data( $post ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 3d5bed3cb1..ce73a37d50 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.