WordPress.org

Make WordPress Core

Ticket #16714: 16714.9.diff

File 16714.9.diff, 1.3 KB (added by johnbillion, 5 years ago)
  • wp-admin/menu.php

     
    8181$menu[20] = array( __('Pages'), 'edit_pages', 'edit.php?post_type=page', '', 'menu-top menu-icon-page', 'menu-pages', 'none' );
    8282        $submenu['edit.php?post_type=page'][5] = array( __('All Pages'), 'edit_pages', 'edit.php?post_type=page' );
    8383        /* translators: add new page */
    84         $submenu['edit.php?post_type=page'][10] = array( _x('Add New', 'page'), 'edit_pages', 'post-new.php?post_type=page' );
     84        $submenu['edit.php?post_type=page'][10] = array( _x('Add New', 'page'), 'create_pages', 'post-new.php?post_type=page' );
    8585        $i = 15;
    8686        foreach ( get_taxonomies( array(), 'objects' ) as $tax ) {
    8787                if ( ! $tax->show_ui || ! in_array('page', (array) $tax->object_type, true) )
  • wp-includes/capabilities.php

     
    10681068                $caps[] = $post_type_object->cap->create_posts;
    10691069
    10701070                break;
     1071        case 'create_pages':
     1072                $caps[] = get_post_type_object( 'page' )->cap->create_posts;
     1073
     1074                break;
    10711075                // edit_post breaks down to edit_posts, edit_published_posts, or
    10721076                // edit_others_posts
    10731077        case 'edit_post':