Make WordPress Core

Ticket #26066: 26066.diff

File 26066.diff, 1.8 KB (added by kovshenin, 11 years ago)
  • wp-admin/includes/dashboard.php

     
    180180        <ul>
    181181        <?php
    182182        do_action( 'rightnow_list_start' );
    183         // Using show_in_nav_menus as my arg for grabbing what post types should show, is there better?
     183
    184184        $post_types = get_post_types( array( 'show_in_nav_menus' => true ), 'objects' );
    185185        $post_types = (array) apply_filters( 'rightnow_post_types', $post_types );
    186186        foreach ( $post_types as $post_type => $post_type_obj ){
    187187                $num_posts = wp_count_posts( $post_type );
    188188                if ( $num_posts && $num_posts->publish ) {
    189189                        printf(
    190                                 '<li class="%1$s-count"><a href="edit.php?post_type=%1$s">%2$s %3$s</a></li>',
     190                                '<li class="%1$s-count"><a href="edit.php?post_type=%1$s">%2$s</a></li>',
    191191                                $post_type,
    192                                 number_format_i18n( $num_posts->publish ),
    193                                 $post_type_obj->label
     192                                sprintf( translate_nooped_plural( $post_type_obj->labels->num_items, $num_posts->publish ), number_format_i18n( $num_posts->publish ) )
    194193                        );
    195194                }
    196195        }
  • wp-includes/post.php

     
    14901490                'not_found' => array( __('No posts found.'), __('No pages found.') ),
    14911491                'not_found_in_trash' => array( __('No posts found in Trash.'), __('No pages found in Trash.') ),
    14921492                'parent_item_colon' => array( null, __('Parent Page:') ),
    1493                 'all_items' => array( __( 'All Posts' ), __( 'All Pages' ) )
     1493                'all_items' => array( __( 'All Posts' ), __( 'All Pages' ) ),
     1494                'num_items' => array( _n_noop( '%s post', '%s posts' ), _n_noop( '%s page', '%s pages' ) ),
    14941495        );
    14951496        $nohier_vs_hier_defaults['menu_name'] = $nohier_vs_hier_defaults['name'];
    14961497