Check the current user can create sites before showing the button. See #14435 props PeteMall.

git-svn-id: http://svn.automattic.com/wordpress/trunk@16185 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
westi 2010-11-04 17:21:25 +00:00
parent f903ceb524
commit 3c1a13935e
1 changed files with 4 additions and 1 deletions

View File

@ -89,7 +89,10 @@ require_once( '../admin-header.php' );
<?php screen_icon('ms-admin'); ?>
<h2><?php _e('Sites') ?>
<?php echo $msg; ?>
<a href="<?php echo network_admin_url('site-new.php'); ?>" class="button add-new-h2"><?php echo esc_html_x( 'Add New', 'sites' ); ?></a>
<?php if ( current_user_can( 'create_sites') ) : ?>
<a href="<?php echo network_admin_url('site-new.php'); ?>" class="button add-new-h2"><?php echo esc_html_x( 'Add New', 'sites' ); ?></a>
<?php endif; ?>
<?php if ( isset( $_REQUEST['s'] ) && $_REQUEST['s'] ) {
printf( '<span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;' ) . '</span>', esc_html( $s ) );
} ?>