WordPress.org

Make WordPress Core


Ignore:
Timestamp:
04/22/2020 10:29:34 AM (5 months ago)
Author:
SergeyBiryukov
Message:

Docs: Synchronize parameter documentation for various metadata functions, update per the documentation standards.

See #49572.

File:
1 edited

Legend:

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

    r47610 r47611  
    787787 * @param int    $user_id    User ID.
    788788 * @param string $meta_key   Metadata name.
    789  * @param mixed  $meta_value Metadata value.
    790  * @param bool   $unique     Optional. Whether the same key should not be added. Default false.
     789 * @param mixed  $meta_value Metadata value. Must be serializable if non-scalar.
     790 * @param bool   $unique     Optional. Whether the same key should not be added.
     791 *                           Default false.
    791792 * @return int|false Meta ID on success, false on failure.
    792793 */
     
    807808 * @param int    $user_id    User ID
    808809 * @param string $meta_key   Metadata name.
    809  * @param mixed  $meta_value Optional. Metadata value.
     810 * @param mixed  $meta_value Optional. Metadata value. If provided,
     811 *                           rows will only be removed that match the value.
     812 *                           Must be serializable if non-scalar. Default empty.
    810813 * @return bool True on success, false on failure.
    811814 */
     
    821824 *
    822825 * @param int    $user_id User ID.
    823  * @param string $key     Optional. The meta key to retrieve. By default, returns data for all keys.
    824  * @param bool   $single  Optional. Whether to return a single value. Default false.
    825  * @return mixed Will be an array if $single is false. Will be value of meta data field if $single is true.
     826 * @param string $key     Optional. The meta key to retrieve. By default,
     827 *                        returns data for all keys.
     828 * @param bool   $single  Optional. Whether to return a single value.
     829 *                        This parameter has no effect if $key is not specified.
     830 *                        Default false.
     831 * @return mixed An array if $single is false. The value of meta data field
     832 *               if $single is true.
    826833 */
    827834function get_user_meta( $user_id, $key = '', $single = false ) {
     
    842849 * @param int    $user_id    User ID.
    843850 * @param string $meta_key   Metadata key.
    844  * @param mixed  $meta_value Metadata value.
    845  * @param mixed  $prev_value Optional. Previous value to check before updating. Default empty.
    846  * @return int|bool Meta ID if the key didn't exist, true on successful update, false on failure.
     851 * @param mixed  $meta_value Metadata value. Must be serializable if non-scalar.
     852 * @param mixed  $prev_value Optional. Previous value to check before updating.
     853 *                           Default empty.
     854 * @return int|bool Meta ID if the key didn't exist, true on successful update,
     855 *                  false on failure.
    847856 */
    848857function update_user_meta( $user_id, $meta_key, $meta_value, $prev_value = '' ) {
Note: See TracChangeset for help on using the changeset viewer.