WordPress.org

Make WordPress Core

Ticket #50891: 50891.diff

File 50891.diff, 1.8 KB (added by johnbillion, 5 months ago)
  • src/wp-includes/meta.php

    diff --git src/wp-includes/meta.php src/wp-includes/meta.php
    index 213bfd6a73..303fb29679 100644
    function get_metadata_raw( $meta_type, $object_id, $meta_key = '', $single = fal 
    590590}
    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
    596596 * if it's false.
    function get_metadata_default( $meta_type, $object_id, $meta_key, $single = fals 
    613613        }
    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
    622628         *
    function sanitize_meta( $meta_key, $meta_value, $object_type, $object_subtype = 
    12271233 *              `$sanitize_callback` and `$auth_callback` have been folded into this array.
    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',
    12321239 *                                  or any other object type with an associated meta table.