Make WordPress Core


Ignore:
Timestamp:
04/22/2020 09:38:12 AM (5 years ago)
Author:
SergeyBiryukov
Message:

Docs: Document the default value of $single and $prev_value parameters in various metadata functions.

Props denisco.
See #49572.

File:
1 edited

Legend:

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

    r47597 r47610  
    451451 * @param string $meta_key Metadata name.
    452452 * @param mixed $meta_value Metadata value.
    453  * @param bool $unique Optional, default is false. Whether the same key should not be added.
     453 * @param bool $unique Optional. Whether the same key should not be added. Default false.
    454454 * @return int|bool Meta ID on success, false on failure.
    455455 */
     
    485485 * @param int $comment_id Comment ID.
    486486 * @param string $key Optional. The meta key to retrieve. By default, returns data for all keys.
    487  * @param bool $single Whether to return a single value.
     487 * @param bool $single Optional. Whether to return a single value. Default false.
    488488 * @return mixed Will be an array if $single is false. Will be value of meta data field if $single
    489489 *  is true.
     
    507507 * @param string $meta_key Metadata key.
    508508 * @param mixed $meta_value Metadata value.
    509  * @param mixed $prev_value Optional. Previous value to check before removing.
     509 * @param mixed $prev_value Optional. Previous value to check before updating. Default empty.
    510510 * @return int|bool Meta ID if the key didn't exist, true on successful update, false on failure.
    511511 */
Note: See TracChangeset for help on using the changeset viewer.