mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Replace array_shift() with reset() where appropriate for performance.
Props SergeyBiryukov. Fixes #31259. git-svn-id: https://develop.svn.wordpress.org/trunk@31829 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -315,7 +315,7 @@ do_action( 'personal_options', $profileuser );
|
||||
<?php
|
||||
// Compare user role against currently editable roles
|
||||
$user_roles = array_intersect( array_values( $profileuser->roles ), array_keys( get_editable_roles() ) );
|
||||
$user_role = array_shift( $user_roles );
|
||||
$user_role = reset( $user_roles );
|
||||
|
||||
// print the full list of roles with the primary one selected.
|
||||
wp_dropdown_roles($user_role);
|
||||
|
||||
Reference in New Issue
Block a user