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:
parent
6bf5238ebb
commit
7b0f5e5de8
|
@ -609,7 +609,7 @@ class WP_REST_Users_Controller extends WP_REST_Controller {
|
||||||
sort( $request_params );
|
sort( $request_params );
|
||||||
// If only 'id' and 'roles' are specified (we are only trying to
|
// If only 'id' and 'roles' are specified (we are only trying to
|
||||||
// edit roles), then only the 'promote_user' cap is required.
|
// edit roles), then only the 'promote_user' cap is required.
|
||||||
if ( $request_params === array( 'id', 'roles' ) ) {
|
if ( array( 'id', 'roles' ) === $request_params ) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue