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/comment.php

    r48208 r48214  
    518518 * @param mixed  $meta_value Metadata value. Must be serializable if non-scalar.
    519519 * @param mixed  $prev_value Optional. Previous value to check before updating.
    520  *                           Default empty.
     520 *                           If specified, only update existing metadata entries with
     521 *                           this value. Otherwise, update all entries. Default empty.
    521522 * @return int|bool Meta ID if the key didn't exist, true on successful update,
    522  *                  false on failure.
     523 *                  false on failure or if the value passed to the function
     524 *                  is the same as the one that is already in the database.
    523525 */
    524526function update_comment_meta( $comment_id, $meta_key, $meta_value, $prev_value = '' ) {
Note: See TracChangeset for help on using the changeset viewer.