Make WordPress Core


Ignore:
Timestamp:
11/28/2012 10:28:20 PM (12 years ago)
Author:
nacin
Message:

Use the create_posts post type cap in more places. Remove the janky create_posts meta cap. see #16714.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/menu.php

    r22900 r22908  
    5050    $submenu['edit.php'][5]  = array( __('All Posts'), 'edit_posts', 'edit.php' );
    5151    /* translators: add new post */
    52     $submenu['edit.php'][10]  = array( _x('Add New', 'post'), 'create_posts', 'post-new.php' );
     52    $submenu['edit.php'][10]  = array( _x('Add New', 'post'), get_post_type_object( 'post' )->cap->create_posts, 'post-new.php' );
    5353
    5454    $i = 15;
     
    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'), get_post_type_object( 'page' )->cap->create_posts, 'post-new.php?post_type=page' );
    8585    $i = 15;
    8686    foreach ( get_taxonomies( array(), 'objects' ) as $tax ) {
Note: See TracChangeset for help on using the changeset viewer.