Make WordPress Core


Ignore:
Timestamp:
01/08/2020 11:30:37 AM (5 years ago)
Author:
SergeyBiryukov
Message:

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

Props jenilk.
Fixes #49150.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php

    r47034 r47050  
    610610            // If only 'id' and 'roles' are specified (we are only trying to
    611611            // edit roles), then only the 'promote_user' cap is required.
    612             if ( $request_params === array( 'id', 'roles' ) ) {
     612            if ( array( 'id', 'roles' ) === $request_params ) {
    613613                return true;
    614614            }
Note: See TracChangeset for help on using the changeset viewer.