Changeset 18261 for trunk/wp-includes/admin-bar.php
- Timestamp:
- 06/11/2011 02:20:18 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/admin-bar.php
r18254 r18261 239 239 function wp_admin_bar_new_content_menu( $wp_admin_bar ) { 240 240 $actions = array(); 241 foreach ( (array) get_post_types( array( 'show_ ui' => true ), 'objects' ) as $ptype_obj ) {242 if ( true !== $ptype_obj->show_in_menu ||! current_user_can( $ptype_obj->cap->edit_posts ) )241 foreach ( (array) get_post_types( array( 'show_in_admin_bar' => true ), 'objects' ) as $ptype_obj ) { 242 if ( ! current_user_can( $ptype_obj->cap->edit_posts ) ) 243 243 continue; 244 244 245 $actions[ 'post-new.php?post_type=' . $ptype_obj->name ] = array( $ptype_obj->labels-> singular_name, $ptype_obj->cap->edit_posts, 'new-' . $ptype_obj->name );245 $actions[ 'post-new.php?post_type=' . $ptype_obj->name ] = array( $ptype_obj->labels->name_admin_bar, $ptype_obj->cap->edit_posts, 'new-' . $ptype_obj->name ); 246 246 } 247 247
Note: See TracChangeset
for help on using the changeset viewer.