Make WordPress Core

Ticket #25497: 25497.2.diff

File 25497.2.diff, 2.1 KB (added by kpdesign, 12 years ago)

Second pass

  • src/wp-admin/network/site-users.php

     
    164164$parent_file = 'sites.php';
    165165$submenu_file = 'sites.php';
    166166
     167/**
     168 * Whether to show the Add Existing User form on the Multisite Users screen.
     169 *
     170 * @since 3.1.0
     171 *
     172 * @param bool true Whether to show the Add Existing User form. Default true.
     173 */
    167174if ( ! wp_is_large_network( 'users' ) && apply_filters( 'show_network_site_users_add_existing_form', true ) )
    168175        wp_enqueue_script( 'user-suggest' );
    169176
     
    243250
    244251</form>
    245252
    246 <?php do_action( 'network_site_users_after_list_table', '' );?>
     253<?php
    247254
    248 <?php if ( current_user_can( 'promote_users' ) && apply_filters( 'show_network_site_users_add_existing_form', true ) ) : ?>
     255/**
     256 * Fires after listing the users table in the Multisite network admin.
     257 *
     258 * @since 3.1.0
     259 *
     260 * @param string
     261 */
     262do_action( 'network_site_users_after_list_table', '' );?>
     263
     264<?php
     265//duplicate_hook
     266if ( current_user_can( 'promote_users' ) && apply_filters( 'show_network_site_users_add_existing_form', true ) ) : ?>
    249267<h3 id="add-existing-user"><?php _e( 'Add Existing User' ); ?></h3>
    250268<form action="site-users.php?action=adduser" id="adduser" method="post">
    251269        <input type="hidden" name="id" value="<?php echo esc_attr( $id ) ?>" />
     
    272290</form>
    273291<?php endif; ?>
    274292
    275 <?php if ( current_user_can( 'create_users' ) && apply_filters( 'show_network_site_users_add_new_form', true ) ) : ?>
     293<?php
     294/* Whether to show the Add New User form on the Multisite Users screen.
     295 *
     296 * @since 3.1.0
     297 *
     298 * @param bool true Whether to show the Add New User form. Default true.
     299 */
     300if ( current_user_can( 'create_users' ) && apply_filters( 'show_network_site_users_add_new_form', true ) ) : ?>
    276301<h3 id="add-new-user"><?php _e( 'Add New User' ); ?></h3>
    277302<form action="<?php echo network_admin_url('site-users.php?action=newuser'); ?>" id="newuser" method="post">
    278303        <input type="hidden" name="id" value="<?php echo esc_attr( $id ) ?>" />