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:
parent
f903ceb524
commit
3c1a13935e
|
@ -89,7 +89,10 @@ require_once( '../admin-header.php' );
|
||||||
<?php screen_icon('ms-admin'); ?>
|
<?php screen_icon('ms-admin'); ?>
|
||||||
<h2><?php _e('Sites') ?>
|
<h2><?php _e('Sites') ?>
|
||||||
<?php echo $msg; ?>
|
<?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'] ) {
|
<?php if ( isset( $_REQUEST['s'] ) && $_REQUEST['s'] ) {
|
||||||
printf( '<span class="subtitle">' . __( 'Search results for “%s”' ) . '</span>', esc_html( $s ) );
|
printf( '<span class="subtitle">' . __( 'Search results for “%s”' ) . '</span>', esc_html( $s ) );
|
||||||
} ?>
|
} ?>
|
||||||
|
|
Loading…
Reference in New Issue