--- a/wp/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php Tue Dec 15 15:52:01 2020 +0100
+++ b/wp/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php Wed Sep 21 18:19:35 2022 +0200
@@ -37,7 +37,7 @@
}
/**
- * Registers the routes for the objects of the controller.
+ * Registers the routes for users.
*
* @since 4.7.0
*
@@ -312,7 +312,7 @@
* @since 4.7.0
*
* @param array $prepared_args Array of arguments for WP_User_Query.
- * @param WP_REST_Request $request The current request.
+ * @param WP_REST_Request $request The REST API request.
*/
$prepared_args = apply_filters( 'rest_user_query', $prepared_args, $request );
@@ -1073,7 +1073,7 @@
*
* @since 4.7.0
*
- * @param WP_Post $user User object.
+ * @param WP_User $user User object.
* @return array Links for the given user.
*/
protected function prepare_links( $user ) {
@@ -1173,8 +1173,8 @@
*
* @since 4.7.0
*
- * @param integer $user_id User ID.
- * @param array $roles New user roles.
+ * @param int $user_id User ID.
+ * @param array $roles New user roles.
* @return true|WP_Error True if the current user is allowed to make the role change,
* otherwise a WP_Error object.
*/
@@ -1291,7 +1291,11 @@
if ( false !== strpos( $password, '\\' ) ) {
return new WP_Error(
'rest_user_invalid_password',
- __( 'Passwords cannot contain the "\\" character.' ),
+ sprintf(
+ /* translators: %s: The '\' character. */
+ __( 'Passwords cannot contain the "%s" character.' ),
+ '\\'
+ ),
array( 'status' => 400 )
);
}
@@ -1516,7 +1520,7 @@
$query_params['orderby'] = array(
'default' => 'name',
- 'description' => __( 'Sort collection by object attribute.' ),
+ 'description' => __( 'Sort collection by user attribute.' ),
'enum' => array(
'id',
'include',
@@ -1555,7 +1559,7 @@
);
/**
- * Filter collection parameters for the users controller.
+ * Filters REST API collection parameters for the users controller.
*
* This filter registers the collection parameter, but does not map the
* collection parameter to an internal WP_User_Query parameter. Use the