Make WordPress Core

Ticket #34113: 34113.diff

File 34113.diff, 2.1 KB (added by paulwilde, 8 years ago)
  • wp-includes/admin-bar.php

    diff --git a/wp-includes/admin-bar.php b/wp-includes/admin-bar.php
    index a12e9c9..58d07a7 100644
    a b function wp_admin_bar_edit_menu( $wp_admin_bar ) { 
    565565                                        'href' => get_permalink( $post->ID )
    566566                                ) );
    567567                        }
     568                } elseif ( 'edit' == $current_screen->base
     569                        && ( $post_type_object = get_post_type_object( $current_screen->post_type ) )
     570                        && ( $post_type_object->public )
     571                        && ( $post_type_object->show_in_admin_bar )
     572                        && ( $post_type_object->has_archive ) )
     573                {
     574                        $wp_admin_bar->add_menu( array(
     575                                'id' => 'view',
     576                                'title' => $post_type_object->labels->view_items,
     577                                'href' => get_post_type_archive_link( $current_screen->post_type )
     578                        ) );
    568579                } elseif ( 'edit-tags' == $current_screen->base
    569580                        && isset( $tag ) && is_object( $tag )
    570581                        && ( $tax = get_taxonomy( $tag->taxonomy ) )
  • wp-includes/post-functions.php

    diff --git a/wp-includes/post-functions.php b/wp-includes/post-functions.php
    index b787e14..165e1bd 100644
    a b function _post_type_meta_capabilities( $capabilities = null ) { 
    13091309 * - edit_item - Default is Edit Post/Edit Page.
    13101310 * - new_item - Default is New Post/New Page.
    13111311 * - view_item - Default is View Post/View Page.
     1312 * - view_items - Default is View Posts/View Pages.
    13121313 * - search_items - Default is Search Posts/Search Pages.
    13131314 * - not_found - Default is No posts found/No pages found.
    13141315 * - not_found_in_trash - Default is No posts found in Trash/No pages found in Trash.
    function get_post_type_labels( $post_type_object ) { 
    13451346                'edit_item' => array( __('Edit Post'), __('Edit Page') ),
    13461347                'new_item' => array( __('New Post'), __('New Page') ),
    13471348                'view_item' => array( __('View Post'), __('View Page') ),
     1349                'view_items' => array( __('View Posts'), __('View Pages') ),
    13481350                'search_items' => array( __('Search Posts'), __('Search Pages') ),
    13491351                'not_found' => array( __('No posts found.'), __('No pages found.') ),
    13501352                'not_found_in_trash' => array( __('No posts found in Trash.'), __('No pages found in Trash.') ),