Make WordPress Core

Changeset 17821


Ignore:
Timestamp:
05/06/2011 07:29:54 PM (14 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/admin-bar.php

    r17778 r17821  
    187187    }
    188188
     189    if ( current_user_can( 'upload_files' ) )
     190        $actions[ 'upload.php' ] = array( __( 'Media' ), 'upload_files', 'new-media' );
     191
     192    if ( current_user_can( 'manage_links' ) )
     193        $actions[ 'link-add.php' ] = array( __( 'Link' ), 'manage_links', 'new-link' );
     194
     195    if ( current_user_can( 'create_users' ) || current_user_can( 'promote_users' ) )
     196        $actions[ 'user-new.php' ] = array( __( 'User' ), 'create_users', 'new-user' );
     197
     198    if ( ! is_multisite() && current_user_can( 'install_themes' ) )
     199        $actions[ 'theme-install.php' ] = array( __( 'Theme' ), 'install_themes', 'new-theme' );
     200
     201    if ( ! is_multisite() && current_user_can( 'install_plugins' ) )
     202        $actions[ 'plugin-install.php' ] = array( __( 'Plugin' ), 'install_plugins', 'new-plugin' );
     203           
    189204    if ( empty( $actions ) )
    190205        return;
Note: See TracChangeset for help on using the changeset viewer.