WordPress.org

Make WordPress Core


Ignore:
Timestamp:
02/18/2014 09:35:07 PM (7 years ago)
Author:
SergeyBiryukov
Message:

Correct return values for update_metadata() and related functions.

fixes #21864.

File:
1 edited

Legend:

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

    r26307 r27191  
    2727 *      unique for the object. If true, and the object already has a value for the specified
    2828 *      metadata key, no change will be made
    29  * @return int|bool The meta ID on successful update, false on failure.
     29 * @return int|bool The meta ID on success, false on failure.
    3030 */
    3131function add_metadata($meta_type, $object_id, $meta_key, $meta_value, $unique = false) {
     
    9797 * @param mixed $prev_value Optional. If specified, only update existing metadata entries with
    9898 *      the specified value. Otherwise, update all entries.
    99  * @return bool True on successful update, false on failure.
     99 * @return int|bool Meta ID if the key didn't exist, true on successful update, false on failure.
    100100 */
    101101function update_metadata($meta_type, $object_id, $meta_key, $meta_value, $prev_value = '') {
Note: See TracChangeset for help on using the changeset viewer.