mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Coding Standards: Use strict type check for in_array() and array_search().
This addresses all the remaining `WordPress.PHP.StrictInArray.MissingTrueStrict` issues in core. Includes minor code layout fixes for better readability. Follow-up to [47550]. See #49542. git-svn-id: https://develop.svn.wordpress.org/trunk@47557 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -922,19 +922,23 @@ function confirm_delete_users( $users ) {
|
||||
'fields' => array( 'ID', 'user_login' ),
|
||||
)
|
||||
);
|
||||
|
||||
if ( is_array( $blog_users ) && ! empty( $blog_users ) ) {
|
||||
$user_site = "<a href='" . esc_url( get_home_url( $details->userblog_id ) ) . "'>{$details->blogname}</a>";
|
||||
$user_dropdown = '<label for="reassign_user" class="screen-reader-text">' . __( 'Select a user' ) . '</label>';
|
||||
$user_dropdown .= "<select name='blog[$user_id][$key]' id='reassign_user'>";
|
||||
$user_list = '';
|
||||
|
||||
foreach ( $blog_users as $user ) {
|
||||
if ( ! in_array( $user->ID, $allusers ) ) {
|
||||
if ( ! in_array( (int) $user->ID, $allusers, true ) ) {
|
||||
$user_list .= "<option value='{$user->ID}'>{$user->user_login}</option>";
|
||||
}
|
||||
}
|
||||
|
||||
if ( '' == $user_list ) {
|
||||
$user_list = $admin_out;
|
||||
}
|
||||
|
||||
$user_dropdown .= $user_list;
|
||||
$user_dropdown .= "</select>\n";
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user