WordPress.org

Make WordPress Core

Changeset 40877


Ignore:
Timestamp:
06/05/17 11:59:51 (5 months ago)
Author:
afercia
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/dashboard.php

    r40866 r40877  
    4949    // QuickPress Widget 
    5050    if ( is_blog_admin() && current_user_can( get_post_type_object( 'post' )->cap->create_posts ) ) { 
    51         $quick_draft_title = sprintf( '<span class="hide-if-no-js">%1$s</span> <span class="hide-if-js">%2$s</span>', __( 'Quick Draft' ), __( 'Drafts' ) ); 
     51        $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' ) ); 
    5252        wp_add_dashboard_widget( 'dashboard_quick_press', $quick_draft_title, 'wp_dashboard_quick_press' ); 
    5353    } 
     
    566566    echo '<div class="drafts">'; 
    567567    if ( count( $drafts ) > 3 ) { 
    568         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"; 
     568        echo '<p class="view-all"><a href="' . esc_url( admin_url( 'edit.php?post_status=draft' ) ) . '">' . __( 'View all drafts' ) . "</a></p>\n"; 
    569569    } 
    570     echo '<h2 class="hide-if-no-js">' . __( 'Drafts' ) . "</h2>\n<ul>"; 
     570    echo '<h2 class="hide-if-no-js">' . __( 'Your Recent Drafts' ) . "</h2>\n<ul>"; 
    571571 
    572572    $drafts = array_slice( $drafts, 0, 3 ); 
Note: See TracChangeset for help on using the changeset viewer.