Make WordPress Core


Ignore:
Timestamp:
08/10/2020 03:40:18 PM (4 years ago)
Author:
whyisjake
Message:

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

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

Fixes #50891.
Props johnbillion.

File:
1 edited

Legend:

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

    r48591 r48777  
    591591
    592592/**
    593  * Retrieves default metadata value for the specified object.
     593 * Retrieves default metadata value for the specified meta key and object.
    594594 *
    595595 * By default, an empty string is returned if `$single` is true, or an empty array
     
    614614
    615615    /**
    616      * Filter the default value for a specified object.
     616     * Filter the default metadata value for a specified meta key and object.
    617617     *
    618618     * The dynamic portion of the hook, `$meta_type`, refers to the meta object type
    619      * (post, comment, term, user, or any other type with an associated meta table).
     619     * (post, comment, term, user, blog, or any other type with an associated meta
     620     * table). Possible filter names include:
     621     *
     622     *  - `default_post_metadata`
     623     *  - `default_comment_metadata`
     624     *  - `default_term_metadata`
     625     *  - `default_user_metadata`
    620626     *
    621627     * @since 5.5.0
     
    12281234 * @since 4.9.8 The `$object_subtype` argument was added to the arguments array.
    12291235 * @since 5.3.0 Valid meta types expanded to include "array" and "object".
     1236 * @since 5.5.0 The `$default` argument was added to the arguments array.
    12301237 *
    12311238 * @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.