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. git-svn-id: https://develop.svn.wordpress.org/trunk@40877 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
99369b9f7b
commit
4379d2ff69
|
@ -48,7 +48,7 @@ function wp_dashboard_setup() {
|
|||
|
||||
// QuickPress Widget
|
||||
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' );
|
||||
}
|
||||
|
||||
|
@ -565,9 +565,9 @@ function wp_dashboard_recent_drafts( $drafts = false ) {
|
|||
|
||||
echo '<div class="drafts">';
|
||||
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 );
|
||||
foreach ( $drafts as $draft ) {
|
||||
|
|
Loading…
Reference in New Issue