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-includes/admin-bar.php

    r22900 r22908  
    364364        ) );
    365365
    366         if ( current_user_can( 'edit_posts' ) ) {
     366        if ( current_user_can( get_post_type_object( 'post' )->cap->create_posts ) ) {
    367367            $wp_admin_bar->add_menu( array(
    368368                'parent' => $menu_id,
     
    371371                'href'   => admin_url( 'post-new.php' ),
    372372            ) );
     373        }
     374
     375        if ( current_user_can( 'edit_posts' ) ) {
    373376            $wp_admin_bar->add_menu( array(
    374377                'parent' => $menu_id,
Note: See TracChangeset for help on using the changeset viewer.