Dashboard: Better titles for the Recent Drafts widget.

- changes "Drafts" to "Your Recent Drafts" to clarify displayed drafts are the ones from the current user
- clarifies and simplifies the "View all" link

Props soniakash, sudar, bhargavbhandari90, zachwtx, johnroper100, rcutmore.
Fixes #37595.

Built from https://develop.svn.wordpress.org/trunk@40877


git-svn-id: http://core.svn.wordpress.org/trunk@40727 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrea Fercia 2017-06-05 12:00:43 +00:00
parent c7f7e76515
commit 1d34043e8c
2 changed files with 4 additions and 4 deletions

View File

@ -48,7 +48,7 @@ function wp_dashboard_setup() {
// QuickPress Widget // QuickPress Widget
if ( is_blog_admin() && current_user_can( get_post_type_object( 'post' )->cap->create_posts ) ) { if ( is_blog_admin() && current_user_can( get_post_type_object( 'post' )->cap->create_posts ) ) {
$quick_draft_title = sprintf( '<span class="hide-if-no-js">%1$s</span> <span class="hide-if-js">%2$s</span>', __( 'Quick Draft' ), __( 'Drafts' ) ); $quick_draft_title = sprintf( '<span class="hide-if-no-js">%1$s</span> <span class="hide-if-js">%2$s</span>', __( 'Quick Draft' ), __( 'Your Recent Drafts' ) );
wp_add_dashboard_widget( 'dashboard_quick_press', $quick_draft_title, 'wp_dashboard_quick_press' ); wp_add_dashboard_widget( 'dashboard_quick_press', $quick_draft_title, 'wp_dashboard_quick_press' );
} }
@ -565,9 +565,9 @@ function wp_dashboard_recent_drafts( $drafts = false ) {
echo '<div class="drafts">'; echo '<div class="drafts">';
if ( count( $drafts ) > 3 ) { if ( count( $drafts ) > 3 ) {
echo '<p class="view-all"><a href="' . esc_url( admin_url( 'edit.php?post_status=draft' ) ) . '" aria-label="' . __( 'View all drafts' ) . '">' . _x( 'View all', 'drafts' ) . "</a></p>\n"; echo '<p class="view-all"><a href="' . esc_url( admin_url( 'edit.php?post_status=draft' ) ) . '">' . __( 'View all drafts' ) . "</a></p>\n";
} }
echo '<h2 class="hide-if-no-js">' . __( 'Drafts' ) . "</h2>\n<ul>"; echo '<h2 class="hide-if-no-js">' . __( 'Your Recent Drafts' ) . "</h2>\n<ul>";
$drafts = array_slice( $drafts, 0, 3 ); $drafts = array_slice( $drafts, 0, 3 );
foreach ( $drafts as $draft ) { foreach ( $drafts as $draft ) {

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.9-alpha-40874'; $wp_version = '4.9-alpha-40877';
/** /**
* 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.