Make WordPress Core

Changeset 47390


Ignore:
Timestamp:
02/28/2020 12:12:58 PM (5 years ago)
Author:
SergeyBiryukov
Message:

Docs: Improve documentation for various metadata functions.

This adds a more specific description for accepted object types: post, comment, term, user, or any other object type with an associated meta table.

Props sheparddw, kraftbj, DrewAPicture, SergeyBiryukov.
Fixes #45464.

File:
1 edited

Legend:

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

    r47122 r47390  
    1212
    1313/**
    14  * Add metadata for the specified object.
     14 * Adds metadata for the specified object.
    1515 *
    1616 * @since 2.9.0
     
    1818 * @global wpdb $wpdb WordPress database abstraction object.
    1919 *
    20  * @param string $meta_type  Type of object metadata is for (e.g., comment, post, term, or user).
    21  * @param int    $object_id  ID of the object metadata is for
    22  * @param string $meta_key   Metadata key
     20 * @param string $meta_type  Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
     21 *                           or any other object type with an associated meta table.
     22 * @param int    $object_id  ID of the object metadata is for.
     23 * @param string $meta_key   Metadata key.
    2324 * @param mixed  $meta_value Metadata value. Must be serializable if non-scalar.
    24  * @param bool   $unique     Optional, default is false.
    25  *                           Whether the specified metadata key should be unique for the object.
     25 * @param bool   $unique     Optional. Whether the specified metadata key should be unique for the object.
    2626 *                           If true, and the object already has a value for the specified metadata key,
    27  *                           no change will be made.
     27 *                           no change will be made. Default false.
    2828 * @return int|false The meta ID on success, false on failure.
    2929 */
     
    6464     *
    6565     * @param null|bool $check      Whether to allow adding metadata for the given type.
    66      * @param int       $object_id  Object ID.
    67      * @param string    $meta_key   Meta key.
    68      * @param mixed     $meta_value Meta value. Must be serializable if non-scalar.
    69      * @param bool      $unique     Whether the specified meta key should be unique
    70      *                              for the object. Optional. Default false.
     66     * @param int       $object_id  ID of the object metadata is for.
     67     * @param string    $meta_key   Metadata key.
     68     * @param mixed     $meta_value Metadata value. Must be serializable if non-scalar.
     69     * @param bool      $unique     Whether the specified meta key should be unique for the object.
    7170     */
    7271    $check = apply_filters( "add_{$meta_type}_metadata", null, $object_id, $meta_key, $meta_value, $unique );
     
    9695     * @since 3.1.0
    9796     *
    98      * @param int    $object_id   Object ID.
    99      * @param string $meta_key    Meta key.
    100      * @param mixed  $_meta_value Meta value.
     97     * @param int    $object_id   ID of the object metadata is for.
     98     * @param string $meta_key    Metadata key.
     99     * @param mixed  $_meta_value Metadata value. Serialized if non-scalar.
    101100     */
    102101    do_action( "add_{$meta_type}_meta", $object_id, $meta_key, $_meta_value );
     
    128127     *
    129128     * @param int    $mid         The meta ID after successful update.
    130      * @param int    $object_id   Object ID.
    131      * @param string $meta_key    Meta key.
    132      * @param mixed  $_meta_value Meta value.
     129     * @param int    $object_id   ID of the object metadata is for.
     130     * @param string $meta_key    Metadata key.
     131     * @param mixed  $_meta_value Metadata value. Serialized if non-scalar.
    133132     */
    134133    do_action( "added_{$meta_type}_meta", $mid, $object_id, $meta_key, $_meta_value );
     
    138137
    139138/**
    140  * Update metadata for the specified object. If no value already exists for the specified object
     139 * Updates metadata for the specified object. If no value already exists for the specified object
    141140 * ID and metadata key, the metadata will be added.
    142141 *
     
    145144 * @global wpdb $wpdb WordPress database abstraction object.
    146145 *
    147  * @param string $meta_type  Type of object metadata is for (e.g., comment, post, term, or user).
    148  * @param int    $object_id  ID of the object metadata is for
    149  * @param string $meta_key   Metadata key
     146 * @param string $meta_type  Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
     147 *                           or any other object type with an associated meta table.
     148 * @param int    $object_id  ID of the object metadata is for.
     149 * @param string $meta_key   Metadata key.
    150150 * @param mixed  $meta_value Metadata value. Must be serializable if non-scalar.
    151  * @param mixed  $prev_value Optional. If specified, only update existing metadata entries with
    152  *                           the specified value. Otherwise, update all entries.
     151 * @param mixed  $prev_value Optional. If specified, only update existing metadata entries
     152 *                           with this value. Otherwise, update all entries.
    153153 * @return int|bool The new meta field ID if a field with the given key didn't exist and was
    154154 *                  therefore added, true on successful update, false on failure.
     
    193193     *
    194194     * @param null|bool $check      Whether to allow updating metadata for the given type.
    195      * @param int       $object_id  Object ID.
    196      * @param string    $meta_key   Meta key.
    197      * @param mixed     $meta_value Meta value. Must be serializable if non-scalar.
    198      * @param mixed     $prev_value Optional. If specified, only update existing
    199      *                              metadata entries with the specified value.
    200      *                              Otherwise, update all entries.
     195     * @param int       $object_id  ID of the object metadata is for.
     196     * @param string    $meta_key   Metadata key.
     197     * @param mixed     $meta_value Metadata value. Must be serializable if non-scalar.
     198     * @param mixed     $prev_value Optional. If specified, only update existing metadata entries
     199     *                              with this value. Otherwise, update all entries.
    201200     */
    202201    $check = apply_filters( "update_{$meta_type}_metadata", null, $object_id, $meta_key, $meta_value, $prev_value );
     
    244243         *
    245244         * @param int    $meta_id     ID of the metadata entry to update.
    246          * @param int    $object_id   Object ID.
    247          * @param string $meta_key    Meta key.
    248          * @param mixed  $_meta_value Meta value.
     245         * @param int    $object_id   ID of the object metadata is for.
     246         * @param string $meta_key    Metadata key.
     247         * @param mixed  $_meta_value Metadata value. Serialized if non-scalar.
    249248         */
    250249        do_action( "update_{$meta_type}_meta", $meta_id, $object_id, $meta_key, $_meta_value );
     
    258257             * @param int    $meta_id    ID of metadata entry to update.
    259258             * @param int    $object_id  Post ID.
    260              * @param string $meta_key   Meta key.
    261              * @param mixed  $meta_value Meta value. This will be a PHP-serialized string representation of the value if
    262              *                           the value is an array, an object, or itself a PHP-serialized string.
     259             * @param string $meta_key   Metadata key.
     260             * @param mixed  $meta_value Metadata value. This will be a PHP-serialized string representation of the value
     261             *                           if the value is an array, an object, or itself a PHP-serialized string.
    263262             */
    264263            do_action( 'update_postmeta', $meta_id, $object_id, $meta_key, $meta_value );
     
    283282         *
    284283         * @param int    $meta_id     ID of updated metadata entry.
    285          * @param int    $object_id   Object ID.
    286          * @param string $meta_key    Meta key.
    287          * @param mixed  $_meta_value Meta value.
     284         * @param int    $object_id   ID of the object metadata is for.
     285         * @param string $meta_key    Metadata key.
     286         * @param mixed  $_meta_value Metadata value. Serialized if non-scalar.
    288287         */
    289288        do_action( "updated_{$meta_type}_meta", $meta_id, $object_id, $meta_key, $_meta_value );
     
    297296             * @param int    $meta_id    ID of updated metadata entry.
    298297             * @param int    $object_id  Post ID.
    299              * @param string $meta_key   Meta key.
    300              * @param mixed  $meta_value Meta value. This will be a PHP-serialized string representation of the value if
    301              *                           the value is an array, an object, or itself a PHP-serialized string.
     298             * @param string $meta_key   Metadata key.
     299             * @param mixed  $meta_value Metadata value. This will be a PHP-serialized string representation of the value
     300             *                           if the value is an array, an object, or itself a PHP-serialized string.
    302301             */
    303302            do_action( 'updated_postmeta', $meta_id, $object_id, $meta_key, $meta_value );
     
    309308
    310309/**
    311  * Delete metadata for the specified object.
     310 * Deletes metadata for the specified object.
    312311 *
    313312 * @since 2.9.0
     
    315314 * @global wpdb $wpdb WordPress database abstraction object.
    316315 *
    317  * @param string $meta_type  Type of object metadata is for (e.g., comment, post, term, or user).
    318  * @param int    $object_id  ID of the object metadata is for
    319  * @param string $meta_key   Metadata key
    320  * @param mixed  $meta_value Optional. Metadata value. Must be serializable if non-scalar. If specified, only delete
    321  *                           metadata entries with this value. Otherwise, delete all entries with the specified meta_key.
    322  *                           Pass `null`, `false`, or an empty string to skip this check. (For backward compatibility,
    323  *                           it is not possible to pass an empty string to delete those entries with an empty string
    324  *                           for a value.)
    325  * @param bool   $delete_all Optional, default is false. If true, delete matching metadata entries for all objects,
    326  *                           ignoring the specified object_id. Otherwise, only delete matching metadata entries for
    327  *                           the specified object_id.
     316 * @param string $meta_type  Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
     317 *                           or any other object type with an associated meta table.
     318 * @param int    $object_id  ID of the object metadata is for.
     319 * @param string $meta_key   Metadata key.
     320 * @param mixed  $meta_value Optional. Metadata value. Must be serializable if non-scalar.
     321 *                           If specified, only delete metadata entries with this value.
     322 *                           Otherwise, delete all entries with the specified meta_key.
     323 *                           Pass `null`, `false`, or an empty string to skip this check.
     324 *                           (For backward compatibility, it is not possible to pass an empty string
     325 *                           to delete those entries with an empty string for a value.)
     326 * @param bool   $delete_all Optional. If true, delete matching metadata entries for all objects,
     327 *                           ignoring the specified object_id. Otherwise, only delete
     328 *                           matching metadata entries for the specified object_id. Default false.
    328329 * @return bool True on successful delete, false on failure.
    329330 */
     
    361362     *
    362363     * @param null|bool $delete     Whether to allow metadata deletion of the given type.
    363      * @param int       $object_id  Object ID.
    364      * @param string    $meta_key   Meta key.
    365      * @param mixed     $meta_value Meta value. Must be serializable if non-scalar.
     364     * @param int       $object_id  ID of the object metadata is for.
     365     * @param string    $meta_key   Metadata key.
     366     * @param mixed     $meta_value Metadata value. Must be serializable if non-scalar.
    366367     * @param bool      $delete_all Whether to delete the matching metadata entries
    367368     *                              for all objects, ignoring the specified $object_id.
     
    408409     *
    409410     * @param string[] $meta_ids    An array of metadata entry IDs to delete.
    410      * @param int      $object_id   Object ID.
    411      * @param string   $meta_key    Meta key.
    412      * @param mixed    $_meta_value Meta value.
     411     * @param int      $object_id   ID of the object metadata is for.
     412     * @param string   $meta_key    Metadata key.
     413     * @param mixed    $_meta_value Metadata value. Serialized if non-scalar.
    413414     */
    414415    do_action( "delete_{$meta_type}_meta", $meta_ids, $object_id, $meta_key, $_meta_value );
     
    451452     *
    452453     * @param string[] $meta_ids    An array of metadata entry IDs to delete.
    453      * @param int      $object_id   Object ID.
    454      * @param string   $meta_key    Meta key.
    455      * @param mixed    $_meta_value Meta value.
     454     * @param int      $object_id   ID of the object metadata is for.
     455     * @param string   $meta_key    Metadata key.
     456     * @param mixed    $_meta_value Metadata value. Serialized if non-scalar.
    456457     */
    457458    do_action( "deleted_{$meta_type}_meta", $meta_ids, $object_id, $meta_key, $_meta_value );
     
    473474
    474475/**
    475  * Retrieve metadata for the specified object.
     476 * Retrieves metadata for the specified object.
    476477 *
    477478 * @since 2.9.0
    478479 *
    479  * @param string $meta_type Type of object metadata is for (e.g., comment, post, term, or user).
    480  * @param int    $object_id ID of the object metadata is for
     480 * @param string $meta_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
     481 *                          or any other object type with an associated meta table.
     482 * @param int    $object_id ID of the object metadata is for.
    481483 * @param string $meta_key  Optional. Metadata key. If not specified, retrieve all metadata for
    482  *                          the specified object.
    483  * @param bool   $single    Optional, default is false.
    484  *                          If true, return only the first value of the specified meta_key.
    485  *                          This parameter has no effect if meta_key is not specified.
     484 *                          the specified object. Default empty.
     485 * @param bool   $single    Optional. If true, return only the first value of the specified meta_key.
     486 *                          This parameter has no effect if meta_key is not specified. Default false.
    486487 * @return mixed Single metadata value, or array of values
    487488 */
     
    507508     * @param null|array|string $value     The value get_metadata() should return - a single metadata value,
    508509     *                                     or an array of values.
    509      * @param int               $object_id Object ID.
    510      * @param string            $meta_key  Meta key.
     510     * @param int               $object_id ID of the object metadata is for.
     511     * @param string            $meta_key  Metadata key.
    511512     * @param bool              $single    Whether to return only the first value of the specified $meta_key.
    512513     */
     
    551552
    552553/**
    553  * Determine if a meta key is set for a given object
     554 * Determines if a meta key is set for a given object.
    554555 *
    555556 * @since 3.3.0
    556557 *
    557  * @param string $meta_type Type of object metadata is for (e.g., comment, post, term, or user).
    558  * @param int    $object_id ID of the object metadata is for
     558 * @param string $meta_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
     559 *                          or any other object type with an associated meta table.
     560 * @param int    $object_id ID of the object metadata is for.
    559561 * @param string $meta_key  Metadata key.
    560562 * @return bool True of the key is set, false if not.
     
    591593
    592594/**
    593  * Get meta data by meta ID
     595 * Retrieves metadata by meta ID.
    594596 *
    595597 * @since 3.3.0
     
    597599 * @global wpdb $wpdb WordPress database abstraction object.
    598600 *
    599  * @param string $meta_type Type of object metadata is for (e.g., comment, post, term, or user).
    600  * @param int    $meta_id   ID for a specific meta row
     601 * @param string $meta_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
     602 *                          or any other object type with an associated meta table.
     603 * @param int    $meta_id   ID for a specific meta row.
    601604 * @return object|false Meta object or false.
    602605 */
     
    651654
    652655/**
    653  * Update meta data by meta ID
     656 * Updates metadata by meta ID.
    654657 *
    655658 * @since 3.3.0
     
    657660 * @global wpdb $wpdb WordPress database abstraction object.
    658661 *
    659  * @param string $meta_type  Type of object metadata is for (e.g., comment, post, term, or user).
    660  * @param int    $meta_id    ID for a specific meta row
    661  * @param string $meta_value Metadata value
    662  * @param string $meta_key   Optional, you can provide a meta key to update it
     662 * @param string $meta_type  Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
     663 *                           or any other object type with an associated meta table.
     664 * @param int    $meta_id    ID for a specific meta row.
     665 * @param string $meta_value Metadata value.
     666 * @param string $meta_key   Optional. You can provide a meta key to update it. Default false.
    663667 * @return bool True on successful update, false on failure.
    664668 */
     
    767771
    768772/**
    769  * Delete meta data by meta ID
     773 * Deletes metadata by meta ID.
    770774 *
    771775 * @since 3.3.0
     
    773777 * @global wpdb $wpdb WordPress database abstraction object.
    774778 *
    775  * @param string $meta_type Type of object metadata is for (e.g., comment, post, term, or user).
    776  * @param int    $meta_id   ID for a specific meta row
     779 * @param string $meta_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
     780 *                          or any other object type with an associated meta table.
     781 * @param int    $meta_id   ID for a specific meta row.
    777782 * @return bool True on successful delete, false on failure.
    778783 */
     
    872877
    873878/**
    874  * Update the metadata cache for the specified objects.
     879 * Updates the metadata cache for the specified objects.
    875880 *
    876881 * @since 2.9.0
     
    878883 * @global wpdb $wpdb WordPress database abstraction object.
    879884 *
    880  * @param string       $meta_type  Type of object metadata is for (e.g., comment, post, term, or user).
     885 * @param string       $meta_type  Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
     886 *                                 or any other object type with an associated meta table.
    881887 * @param string|int[] $object_ids Array or comma delimited list of object IDs to update cache for.
    882888 * @return array|false Metadata cache for the specified objects, or false on failure.
     
    10071013
    10081014/**
    1009  * Retrieve the name of the metadata table for the specified object type.
     1015 * Retrieves the name of the metadata table for the specified object type.
    10101016 *
    10111017 * @since 2.9.0
     
    10131019 * @global wpdb $wpdb WordPress database abstraction object.
    10141020 *
    1015  * @param string $type Type of object to get metadata table for (e.g., comment, post, term, or user).
     1021 * @param string $type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
     1022 *                     or any other object type with an associated meta table.
    10161023 * @return string|false Metadata table name, or false if no metadata table exists
    10171024 */
     
    10331040 * @since 3.1.3
    10341041 *
    1035  * @param string      $meta_key  Meta key.
    1036  * @param string|null $meta_type Optional. Type of object metadata is for (e.g., comment, post, term, or user).
     1042 * @param string $meta_key  Metadata key.
     1043 * @param string $meta_type Optional. Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
     1044 *                          or any other object type with an associated meta table. Default empty.
    10371045 * @return bool Whether the meta key is considered protected.
    10381046 */
    1039 function is_protected_meta( $meta_key, $meta_type = null ) {
     1047function is_protected_meta( $meta_key, $meta_type = '' ) {
    10401048    $protected = ( '_' == $meta_key[0] );
    10411049
     
    10451053     * @since 3.2.0
    10461054     *
    1047      * @param bool        $protected Whether the key is considered protected.
    1048      * @param string      $meta_key  Meta key.
    1049      * @param string|null $meta_type Type of object metadata is for (e.g., comment, post, term, or user).
     1055     * @param bool   $protected Whether the key is considered protected.
     1056     * @param string $meta_key  Metadata key.
     1057     * @param string $meta_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
     1058     *                          or any other object type with an associated meta table.
    10501059     */
    10511060    return apply_filters( 'is_protected_meta', $protected, $meta_key, $meta_type );
     
    10531062
    10541063/**
    1055  * Sanitize meta value.
     1064 * Sanitizes meta value.
    10561065 *
    10571066 * @since 3.1.3
    10581067 * @since 4.9.8 The `$object_subtype` parameter was added.
    10591068 *
    1060  * @param string $meta_key       Meta key.
    1061  * @param mixed  $meta_value     Meta value to sanitize.
    1062  * @param string $object_type    Type of object the meta is registered to.
     1069 * @param string $meta_key       Metadata key.
     1070 * @param mixed  $meta_value     Metadata value to sanitize.
     1071 * @param string $object_type    Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
     1072 *                               or any other object type with an associated meta table.
    10631073 * @param string $object_subtype Optional. The subtype of the object type.
    1064  *
    10651074 * @return mixed Sanitized $meta_value.
    10661075 */
     
    10771086         * @since 4.9.8
    10781087         *
    1079          * @param mixed  $meta_value     Meta value to sanitize.
    1080          * @param string $meta_key       Meta key.
    1081          * @param string $object_type    Object type.
     1088         * @param mixed  $meta_value     Metadata value to sanitize.
     1089         * @param string $meta_key       Metadata key.
     1090         * @param string $object_type    Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
     1091         *                               or any other object type with an associated meta table.
    10821092         * @param string $object_subtype Object subtype.
    10831093         */
     
    10941104     * @since 3.3.0
    10951105     *
    1096      * @param mixed  $meta_value      Meta value to sanitize.
    1097      * @param string $meta_key        Meta key.
    1098      * @param string $object_type     Object type.
     1106     * @param mixed  $meta_value  Metadata value to sanitize.
     1107     * @param string $meta_key    Metadata key.
     1108     * @param string $object_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
     1109     *                            or any other object type with an associated meta table.
    10991110     */
    11001111    return apply_filters( "sanitize_{$object_type}_meta_{$meta_key}", $meta_value, $meta_key, $object_type );
     
    11181129 * @since 5.3.0 Valid meta types expanded to include "array" and "object".
    11191130 *
    1120  * @param string $object_type    Type of object this meta is registered to.
    1121  * @param string $meta_key       Meta key to register.
     1131 * @param string $object_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
     1132 *                            or any other object type with an associated meta table.
     1133 * @param string $meta_key    Meta key to register.
    11221134 * @param array  $args {
    11231135 *     Data used to describe the meta key when registered.
     
    11391151 * }
    11401152 * @param string|array $deprecated Deprecated. Use `$args` instead.
    1141  *
    11421153 * @return bool True if the meta key was successfully registered in the global array, false if not.
    1143  *                       Registering a meta key with distinct sanitize and auth callbacks will fire those
    1144  *                       callbacks, but will not add to the global registry.
     1154 *              Registering a meta key with distinct sanitize and auth callbacks will fire those callbacks,
     1155 *              but will not add to the global registry.
    11451156 */
    11461157function register_meta( $object_type, $meta_key, $args, $deprecated = null ) {
     
    11871198     * @param array  $args        Array of meta registration arguments.
    11881199     * @param array  $defaults    Array of default arguments.
    1189      * @param string $object_type Object type.
     1200     * @param string $object_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
     1201     *                            or any other object type with an associated meta table.
    11901202     * @param string $meta_key    Meta key.
    11911203     */
     
    12481260 * @since 4.9.8 The `$object_subtype` parameter was added.
    12491261 *
    1250  * @param string $object_type    The type of object.
    1251  * @param string $meta_key       The meta key.
     1262 * @param string $object_type    Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
     1263 *                               or any other object type with an associated meta table.
     1264 * @param string $meta_key       Metadata key.
    12521265 * @param string $object_subtype Optional. The subtype of the object type.
    1253  *
    12541266 * @return bool True if the meta key is registered to the object type and, if provided,
    12551267 *              the object subtype. False if not.
     
    12671279 * @since 4.9.8 The `$object_subtype` parameter was added.
    12681280 *
    1269  * @param string $object_type    The type of object.
    1270  * @param string $meta_key       The meta key.
     1281 * @param string $object_type    Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
     1282 *                               or any other object type with an associated meta table.
     1283 * @param string $meta_key       Metadata key.
    12711284 * @param string $object_subtype Optional. The subtype of the object type.
    12721285 * @return bool True if successful. False if the meta key was not registered.
     
    13161329 * @since 4.9.8 The `$object_subtype` parameter was added.
    13171330 *
    1318  * @param string $object_type    The type of object. Post, comment, user, term.
     1331 * @param string $object_type    Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
     1332 *                               or any other object type with an associated meta table.
    13191333 * @param string $object_subtype Optional. The subtype of the object type.
    13201334 * @return string[] List of registered meta keys.
     
    13381352 * @since 4.6.0
    13391353 *
    1340  * @param string $object_type Type of object to request metadata for. (e.g. comment, post, term, user)
     1354 * @param string $object_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
     1355 *                            or any other object type with an associated meta table.
    13411356 * @param int    $object_id   ID of the object the metadata is for.
    13421357 * @param string $meta_key    Optional. Registered metadata key. If not specified, retrieve all registered
     
    13791394
    13801395/**
    1381  * Filter out `register_meta()` args based on a whitelist.
     1396 * Filters out `register_meta()` args based on a whitelist.
     1397 *
    13821398 * `register_meta()` args may change over time, so requiring the whitelist
    13831399 * to be explicitly turned off is a warranty seal of sorts.
     
    13881404 * @param array $args         Arguments from `register_meta()`.
    13891405 * @param array $default_args Default arguments for `register_meta()`.
    1390  *
    13911406 * @return array Filtered arguments.
    13921407 */
     
    14001415 * @since 4.9.8
    14011416 *
    1402  * @param string $object_type Type of object to request metadata for. (e.g. comment, post, term, user)
     1417 * @param string $object_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
     1418 *                            or any other object type with an associated meta table.
    14031419 * @param int    $object_id   ID of the object to retrieve its subtype.
    14041420 * @return string The object subtype or an empty string if unspecified subtype.
Note: See TracChangeset for help on using the changeset viewer.