Make WordPress Core

Changeset 22414


Ignore:
Timestamp:
11/07/2012 07:59:46 AM (12 years ago)
Author:
nacin
Message:

restrict_manage_users action. props jakemgold, johnjamesjacoby. fixes #19295.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-users-list-table.php

    r21914 r22414  
    137137        if ( 'top' != $which )
    138138            return;
    139         if ( ! current_user_can( 'promote_users' ) )
    140             return;
    141 ?>
     139    ?>
    142140    <div class="alignleft actions">
     141        <?php if ( current_user_can( 'promote_users' ) ) : ?>
    143142        <label class="screen-reader-text" for="new_role"><?php _e( 'Change role to&hellip;' ) ?></label>
    144143        <select name="new_role" id="new_role">
     
    146145            <?php wp_dropdown_roles(); ?>
    147146        </select>
    148         <?php submit_button( __( 'Change' ), 'small', 'changeit', false ); ?>
    149     </div>
    150 <?php
     147    <?php
     148            submit_button( __( 'Change' ), 'small', 'changeit', false );
     149        endif;
     150
     151        do_action( 'restrict_manage_users' );
     152        echo '</div>';
    151153    }
    152154
Note: See TracChangeset for help on using the changeset viewer.