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

git-svn-id: http://core.svn.wordpress.org/trunk@22414 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2012-11-07 07:59:46 +00:00
parent 10b381a047
commit dd50d7d0e0
1 changed files with 8 additions and 6 deletions

View File

@ -136,18 +136,20 @@ class WP_Users_List_Table extends WP_List_Table {
function extra_tablenav( $which ) {
if ( 'top' != $which )
return;
if ( ! current_user_can( 'promote_users' ) )
return;
?>
?>
<div class="alignleft actions">
<?php if ( current_user_can( 'promote_users' ) ) : ?>
<label class="screen-reader-text" for="new_role"><?php _e( 'Change role to&hellip;' ) ?></label>
<select name="new_role" id="new_role">
<option value=''><?php _e( 'Change role to&hellip;' ) ?></option>
<?php wp_dropdown_roles(); ?>
</select>
<?php submit_button( __( 'Change' ), 'small', 'changeit', false ); ?>
</div>
<?php
<?php
submit_button( __( 'Change' ), 'small', 'changeit', false );
endif;
do_action( 'restrict_manage_users' );
echo '</div>';
}
function current_action() {