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:
parent
10b381a047
commit
dd50d7d0e0
|
@ -136,18 +136,20 @@ class WP_Users_List_Table extends WP_List_Table {
|
||||||
function extra_tablenav( $which ) {
|
function extra_tablenav( $which ) {
|
||||||
if ( 'top' != $which )
|
if ( 'top' != $which )
|
||||||
return;
|
return;
|
||||||
if ( ! current_user_can( 'promote_users' ) )
|
?>
|
||||||
return;
|
|
||||||
?>
|
|
||||||
<div class="alignleft actions">
|
<div class="alignleft actions">
|
||||||
|
<?php if ( current_user_can( 'promote_users' ) ) : ?>
|
||||||
<label class="screen-reader-text" for="new_role"><?php _e( 'Change role to…' ) ?></label>
|
<label class="screen-reader-text" for="new_role"><?php _e( 'Change role to…' ) ?></label>
|
||||||
<select name="new_role" id="new_role">
|
<select name="new_role" id="new_role">
|
||||||
<option value=''><?php _e( 'Change role to…' ) ?></option>
|
<option value=''><?php _e( 'Change role to…' ) ?></option>
|
||||||
<?php wp_dropdown_roles(); ?>
|
<?php wp_dropdown_roles(); ?>
|
||||||
</select>
|
</select>
|
||||||
<?php submit_button( __( 'Change' ), 'small', 'changeit', false ); ?>
|
<?php
|
||||||
</div>
|
submit_button( __( 'Change' ), 'small', 'changeit', false );
|
||||||
<?php
|
endif;
|
||||||
|
|
||||||
|
do_action( 'restrict_manage_users' );
|
||||||
|
echo '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
function current_action() {
|
function current_action() {
|
||||||
|
|
Loading…
Reference in New Issue