Coding Standards: Use Yoda conditions in `wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php`.

Props jenilk.
Fixes #49150.

git-svn-id: https://develop.svn.wordpress.org/trunk@47050 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2020-01-08 11:30:37 +00:00
parent 6bf5238ebb
commit 7b0f5e5de8
1 changed files with 1 additions and 1 deletions

View File

@ -609,7 +609,7 @@ class WP_REST_Users_Controller extends WP_REST_Controller {
sort( $request_params );
// If only 'id' and 'roles' are specified (we are only trying to
// edit roles), then only the 'promote_user' cap is required.
if ( $request_params === array( 'id', 'roles' ) ) {
if ( array( 'id', 'roles' ) === $request_params ) {
return true;
}
}