Make WordPress Core

Changeset 16185


Ignore:
Timestamp:
11/04/2010 05:21:25 PM (14 years ago)
Author:
westi
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/network/sites.php

    r16175 r16185  
    9090<h2><?php _e('Sites') ?>
    9191<?php echo $msg; ?>
    92 <a href="<?php echo network_admin_url('site-new.php'); ?>" class="button add-new-h2"><?php echo esc_html_x( 'Add New', 'sites' ); ?></a>
     92<?php if ( current_user_can( 'create_sites') ) : ?>
     93        <a href="<?php echo network_admin_url('site-new.php'); ?>" class="button add-new-h2"><?php echo esc_html_x( 'Add New', 'sites' ); ?></a>
     94<?php endif; ?>
     95
    9396<?php if ( isset( $_REQUEST['s'] ) && $_REQUEST['s'] ) {
    9497    printf( '<span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;' ) . '</span>', esc_html( $s ) );
Note: See TracChangeset for help on using the changeset viewer.