mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Accept 'ID' as a valid $field in get_user_by().
We already accept 'id'. `ID` more closely matches the database and `WP_User` schemas. Props Shelob9. Fixes #33869. git-svn-id: https://develop.svn.wordpress.org/trunk@34125 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -145,8 +145,9 @@ if ( !function_exists('get_user_by') ) :
|
||||
* Retrieve user info by a given field
|
||||
*
|
||||
* @since 2.8.0
|
||||
* @since 4.4.0 Added 'ID' as an alias of 'id' for the `$field` parameter.
|
||||
*
|
||||
* @param string $field The field to retrieve the user with. id | slug | email | login
|
||||
* @param string $field The field to retrieve the user with. id | ID | slug | email | login.
|
||||
* @param int|string $value A value for $field. A user ID, slug, email address, or login name.
|
||||
* @return WP_User|false WP_User object on success, false on failure.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user