Make WordPress Core


Ignore:
Timestamp:
06/29/2020 09:20:11 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Docs: Improve documentation for the $prev_value parameter and return result of various metadata update functions.

Props stevenlinx.
Fixes #50502. See #49572.

File:
1 edited

Legend:

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

    r48185 r48214  
    854854 * @param mixed  $meta_value Metadata value. Must be serializable if non-scalar.
    855855 * @param mixed  $prev_value Optional. Previous value to check before updating.
    856  *                           Default empty.
     856 *                           If specified, only update existing metadata entries with
     857 *                           this value. Otherwise, update all entries. Default empty.
    857858 * @return int|bool Meta ID if the key didn't exist, true on successful update,
    858  *                  false on failure.
     859 *                  false on failure or if the value passed to the function
     860 *                  is the same as the one that is already in the database.
    859861 */
    860862function update_user_meta( $user_id, $meta_key, $meta_value, $prev_value = '' ) {
Note: See TracChangeset for help on using the changeset viewer.