Coding Standards: Use Yoda conditions in wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php.
Props jenilk. Fixes #49150. Built from https://develop.svn.wordpress.org/trunk@47050 git-svn-id: http://core.svn.wordpress.org/trunk@46850 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user