Changeset 21948 for trunk/wp-includes/admin-bar.php
- Timestamp:
- 09/21/2012 10:52:54 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/admin-bar.php
r21818 r21948 488 488 $cpts = (array) get_post_types( array( 'show_in_admin_bar' => true ), 'objects' ); 489 489 490 if ( isset( $cpts['post'] ) && current_user_can( $cpts['post']->cap->edit_posts ) ) {490 if ( isset( $cpts['post'] ) && current_user_can( $cpts['post']->cap->edit_posts ) ) 491 491 $actions[ 'post-new.php' ] = array( $cpts['post']->labels->name_admin_bar, 'new-post' ); 492 unset( $cpts['post'] ); 493 } 494 495 if ( current_user_can( 'upload_files' ) ) 496 $actions[ 'media-new.php' ] = array( _x( 'Media', 'add new from admin bar' ), 'new-media' ); 492 493 if ( isset( $cpts['attachment'] ) && current_user_can( 'upload_files' ) ) 494 $actions[ 'media-new.php' ] = array( $cpts['attachment']->labels->name_admin_bar, 'new-media' ); 497 495 498 496 if ( current_user_can( 'manage_links' ) ) 499 497 $actions[ 'link-add.php' ] = array( _x( 'Link', 'add new from admin bar' ), 'new-link' ); 500 498 501 if ( isset( $cpts['page'] ) && current_user_can( $cpts['page']->cap->edit_posts ) ) {499 if ( isset( $cpts['page'] ) && current_user_can( $cpts['page']->cap->edit_posts ) ) 502 500 $actions[ 'post-new.php?post_type=page' ] = array( $cpts['page']->labels->name_admin_bar, 'new-page' ); 503 unset( $cpts['page'] ); 504 }501 502 unset( $cpts['post'], $cpts['page'], $cpts['attachment'] ); 505 503 506 504 // Add any additional custom post types.
Note: See TracChangeset
for help on using the changeset viewer.