rebase on oct-10-2023

This commit is contained in:
Rachit Bhargava
2023-10-10 17:23:21 -04:00
parent d37566ffb6
commit d096058d7d
4789 changed files with 254611 additions and 307223 deletions

View File

@@ -683,8 +683,10 @@ class WP_REST_Users_Controller extends WP_REST_Controller {
$request_params = array_keys( $request->get_params() );
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 only 'id' and 'roles' are specified (we are only trying to
* edit roles), then only the 'promote_user' cap is required.
*/
if ( array( 'id', 'roles' ) === $request_params ) {
return true;
}
@@ -1305,7 +1307,7 @@ class WP_REST_Users_Controller extends WP_REST_Controller {
);
}
if ( false !== strpos( $password, '\\' ) ) {
if ( str_contains( $password, '\\' ) ) {
return new WP_Error(
'rest_user_invalid_password',
sprintf(