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

    r47578 r47610  
    12471247 * @param int    $term_id Term ID.
    12481248 * @param string $key     Optional. The meta key to retrieve. If no key is provided, fetches all metadata for the term.
    1249  * @param bool   $single  Whether to return a single value. If false, an array of all values matching the
    1250  *                        `$term_id`/`$key` pair will be returned. Default: false.
     1249 * @param bool   $single  Optional. Whether to return a single value. If false, an array of all values matching the
     1250 *                        `$term_id`/`$key` pair will be returned. Default false.
    12511251 * @return mixed If `$single` is false, an array of metadata values. If `$single` is true, a single metadata value.
    12521252 */
     
    12671267 * @param string $meta_key   Metadata key.
    12681268 * @param mixed  $meta_value Metadata value.
    1269  * @param mixed  $prev_value Optional. Previous value to check before removing.
     1269 * @param mixed  $prev_value Optional. Previous value to check before updating. Default empty.
    12701270 * @return int|WP_Error|bool Meta ID if the key didn't previously exist. True on successful update.
    12711271 *                           WP_Error when term_id is ambiguous between taxonomies. False on failure.
Note: See TracChangeset for help on using the changeset viewer.