Round out the objects in the Admin Bar -> Add New list

git-svn-id: http://svn.automattic.com/wordpress/trunk@17821 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2011-05-06 19:29:54 +00:00
parent 18220ff3a4
commit f824fbe47f
1 changed files with 15 additions and 0 deletions

View File

@ -186,6 +186,21 @@ function wp_admin_bar_new_content_menu( $wp_admin_bar ) {
$actions[ 'post-new.php?post_type=' . $ptype_obj->name ] = array( $ptype_obj->labels->singular_name, $ptype_obj->cap->edit_posts, 'new-' . $ptype_obj->name );
}
if ( current_user_can( 'upload_files' ) )
$actions[ 'upload.php' ] = array( __( 'Media' ), 'upload_files', 'new-media' );
if ( current_user_can( 'manage_links' ) )
$actions[ 'link-add.php' ] = array( __( 'Link' ), 'manage_links', 'new-link' );
if ( current_user_can( 'create_users' ) || current_user_can( 'promote_users' ) )
$actions[ 'user-new.php' ] = array( __( 'User' ), 'create_users', 'new-user' );
if ( ! is_multisite() && current_user_can( 'install_themes' ) )
$actions[ 'theme-install.php' ] = array( __( 'Theme' ), 'install_themes', 'new-theme' );
if ( ! is_multisite() && current_user_can( 'install_plugins' ) )
$actions[ 'plugin-install.php' ] = array( __( 'Plugin' ), 'install_plugins', 'new-plugin' );
if ( empty( $actions ) )
return;