Changeset 22900 for trunk/wp-includes/admin-bar.php
- Timestamp:
- 11/28/2012 06:24:11 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/admin-bar.php
r22481 r22900 487 487 $cpts = (array) get_post_types( array( 'show_in_admin_bar' => true ), 'objects' ); 488 488 489 if ( isset( $cpts['post'] ) && current_user_can( $cpts['post']->cap-> edit_posts ) )489 if ( isset( $cpts['post'] ) && current_user_can( $cpts['post']->cap->create_posts ) ) 490 490 $actions[ 'post-new.php' ] = array( $cpts['post']->labels->name_admin_bar, 'new-post' ); 491 491 … … 496 496 $actions[ 'link-add.php' ] = array( _x( 'Link', 'add new from admin bar' ), 'new-link' ); 497 497 498 if ( isset( $cpts['page'] ) && current_user_can( $cpts['page']->cap-> edit_posts ) )498 if ( isset( $cpts['page'] ) && current_user_can( $cpts['page']->cap->create_posts ) ) 499 499 $actions[ 'post-new.php?post_type=page' ] = array( $cpts['page']->labels->name_admin_bar, 'new-page' ); 500 500 … … 503 503 // Add any additional custom post types. 504 504 foreach ( $cpts as $cpt ) { 505 if ( ! current_user_can( $cpt->cap-> edit_posts ) )505 if ( ! current_user_can( $cpt->cap->create_posts ) ) 506 506 continue; 507 507
Note: See TracChangeset
for help on using the changeset viewer.