Make WordPress Core

Ticket #37595: 37595-quick-draft.patch

File 37595-quick-draft.patch, 1.5 KB (added by rcutmore, 6 years ago)

Change title of recent drafts section to "Your Recent Drafts" and view drafts link text to "View all drafts".

  • src/wp-admin/includes/dashboard.php

    diff --git src/wp-admin/includes/dashboard.php src/wp-admin/includes/dashboard.php
    index 51a001d..f0dd65a 100644
    function wp_dashboard_setup() { 
    4848
    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        }
    5454
    function wp_dashboard_recent_drafts( $drafts = false ) { 
    565565
    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' ) ) . '">' . _x( 'View all drafts', '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 );
    573573        foreach ( $drafts as $draft ) {