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/ms-site.php

    r48167 r48214  
    11081108 * @param mixed  $meta_value Metadata value. Must be serializable if non-scalar.
    11091109 * @param mixed  $prev_value Optional. Previous value to check before updating.
    1110  *                           Default empty.
     1110 *                           If specified, only update existing metadata entries with
     1111 *                           this value. Otherwise, update all entries. Default empty.
    11111112 * @return int|bool Meta ID if the key didn't exist, true on successful update,
    1112  *                  false on failure.
     1113 *                  false on failure or if the value passed to the function
     1114 *                  is the same as the one that is already in the database.
    11131115 */
    11141116function update_site_meta( $site_id, $meta_key, $meta_value, $prev_value = '' ) {
Note: See TracChangeset for help on using the changeset viewer.