WordPress.org

Make WordPress Core

Ticket #14435: 14435.16.diff

File 14435.16.diff, 820 bytes (added by PeteMall, 8 years ago)

Use submit_button() and use create_sites. see [16103]

  • wp-admin/network/sites.php

     
    8989<?php screen_icon('ms-admin'); ?>
    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>
     92if ( 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><?php
     94endif;
     95 ?></a>
    9396<?php if ( isset( $_REQUEST['s'] ) && $_REQUEST['s'] ) {
    9497        printf( '<span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;' ) . '</span>', esc_html( $s ) );
    9598} ?>