Make WordPress Core


Ignore:
Timestamp:
04/22/2020 09:38:12 AM (5 years ago)
Author:
SergeyBiryukov
Message:

Docs: Document the default value of $single and $prev_value parameters in various metadata functions.

Props denisco.
See #49572.

File:
1 edited

Legend:

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

    r47550 r47610  
    822822 * @param int    $user_id User ID.
    823823 * @param string $key     Optional. The meta key to retrieve. By default, returns data for all keys.
    824  * @param bool   $single  Whether to return a single value.
     824 * @param bool   $single  Optional. Whether to return a single value. Default false.
    825825 * @return mixed Will be an array if $single is false. Will be value of meta data field if $single is true.
    826826 */
     
    843843 * @param string $meta_key   Metadata key.
    844844 * @param mixed  $meta_value Metadata value.
    845  * @param mixed  $prev_value Optional. Previous value to check before removing.
     845 * @param mixed  $prev_value Optional. Previous value to check before updating. Default empty.
    846846 * @return int|bool Meta ID if the key didn't exist, true on successful update, false on failure.
    847847 */
Note: See TracChangeset for help on using the changeset viewer.