Make WordPress Core

Ticket #37595: dashboard.patch

File dashboard.patch, 803 bytes (added by soniakash, 7 years ago)
  • wp-admin/includes/dashboard.php

    diff --git a/wp-admin/includes/dashboard.php b/wp-admin/includes/dashboard.php
    index e517f95..97ffce4 100644
    a b function wp_dashboard_recent_drafts( $drafts = false ) { 
    564564        if ( count( $drafts ) > 3 ) {
    565565                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";
    566566        }
    567         echo '<h2 class="hide-if-no-js">' . __( 'Drafts' ) . "</h2>\n<ul>";
     567        echo '<h2 class="hide-if-no-js">';       
     568                if ( count( $drafts ) > 1 ) :
     569                        echo __( 'Drafts' );
     570                else:
     571                        echo __( 'Draft' );
     572                endif;
     573        echo "</h2>\n<ul>";
    568574
    569575        $drafts = array_slice( $drafts, 0, 3 );
    570576        foreach ( $drafts as $draft ) {