WordPress.org

Make WordPress Core


Ignore:
Timestamp:
06/29/2020 09:20:11 PM (16 months 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/taxonomy.php

    r48197 r48214  
    12751275 * @param mixed  $meta_value Metadata value. Must be serializable if non-scalar.
    12761276 * @param mixed  $prev_value Optional. Previous value to check before updating.
    1277  *                           Default empty.
     1277 *                           If specified, only update existing metadata entries with
     1278 *                           this value. Otherwise, update all entries. Default empty.
    12781279 * @return int|bool|WP_Error Meta ID if the key didn't exist. true on successful update,
    1279  *                           false on failure. WP_Error when term_id is ambiguous
    1280  *                           between taxonomies.
     1280 *                           false on failure or if the value passed to the function
     1281 *                           is the same as the one that is already in the database.
     1282 *                           WP_Error when term_id is ambiguous between taxonomies.
    12811283 */
    12821284function update_term_meta( $term_id, $meta_key, $meta_value, $prev_value = '' ) {
Note: See TracChangeset for help on using the changeset viewer.