Make WordPress Core


Ignore:
Timestamp:
09/14/2015 06:57:15 PM (11 years ago)
Author:
boonebgorges
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/pluggable.php

    r34116 r34125  
    146146 *
    147147 * @since 2.8.0
    148  *
    149  * @param string     $field The field to retrieve the user with. id | slug | email | login
     148 * @since 4.4.0 Added 'ID' as an alias of 'id' for the `$field` parameter.
     149 *
     150 * @param string     $field The field to retrieve the user with. id | ID | slug | email | login.
    150151 * @param int|string $value A value for $field. A user ID, slug, email address, or login name.
    151152 * @return WP_User|false WP_User object on success, false on failure.
Note: See TracChangeset for help on using the changeset viewer.