WordPress.org

Make WordPress Core

Changeset 48779


Ignore:
Timestamp:
08/10/2020 03:52:01 PM (5 months ago)
Author:
SergeyBiryukov
Message:

Options, Meta APIs: Update the docs around default metadata values.

Add a missing @since value for 5.5 and potential default filter names.

Props johnbillion.
Reviewed by whyisjake, SergeyBiryukov.
Merges [48777] and [48778] to the 5.5 branch.
Fixes #50891.

Location:
branches/5.5
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.5

  • branches/5.5/src/wp-includes/meta.php

    r48591 r48779  
    544544     * Returning a non-null value will effectively short-circuit the function.
    545545     *
     546     * Possible filter names include:
     547     *
     548     *  - `get_post_metadata`
     549     *  - `get_comment_metadata`
     550     *  - `get_term_metadata`
     551     *  - `get_user_metadata`
     552     *
    546553     * @since 3.1.0
    547554     * @since 5.5.0 Added the `$meta_type` parameter.
     
    591598
    592599/**
    593  * Retrieves default metadata value for the specified object.
     600 * Retrieves default metadata value for the specified meta key and object.
    594601 *
    595602 * By default, an empty string is returned if `$single` is true, or an empty array
     
    614621
    615622    /**
    616      * Filter the default value for a specified object.
     623     * Filters the default metadata value for a specified meta key and object.
    617624     *
    618625     * The dynamic portion of the hook, `$meta_type`, refers to the meta object type
    619626     * (post, comment, term, user, or any other type with an associated meta table).
     627     *
     628     * Possible filter names include:
     629     *
     630     *  - `default_post_metadata`
     631     *  - `default_comment_metadata`
     632     *  - `default_term_metadata`
     633     *  - `default_user_metadata`
    620634     *
    621635     * @since 5.5.0
     
    12281242 * @since 4.9.8 The `$object_subtype` argument was added to the arguments array.
    12291243 * @since 5.3.0 Valid meta types expanded to include "array" and "object".
     1244 * @since 5.5.0 The `$default` argument was added to the arguments array.
    12301245 *
    12311246 * @param string       $object_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
Note: See TracChangeset for help on using the changeset viewer.