Make WordPress Core

Ticket #45464: 45464.diff

File 45464.diff, 6.3 KB (added by kraftbj, 4 years ago)
  • src/wp-includes/meta.php

    diff --git src/wp-includes/meta.php src/wp-includes/meta.php
    index 0942a5a0db..64a4b5ea90 100644
    function is_protected_meta( $meta_key, $meta_type = null ) { 
    10511051 *
    10521052 * @param string $meta_key       Meta key.
    10531053 * @param mixed  $meta_value     Meta value to sanitize.
    1054  * @param string $object_type    Type of object the meta is registered to.
     1054 * @param string $object_type    Type of object this meta is registered to. Accepts any value with an associated meta table.
     1055 *                               (e.g. comment, post, term, user, my_custom_meta)
    10551056 * @param string $object_subtype Optional. The subtype of the object type.
    10561057 *
    10571058 * @return mixed Sanitized $meta_value.
    function sanitize_meta( $meta_key, $meta_value, $object_type, $object_subtype = 
    10701071                 *
    10711072                 * @param mixed  $meta_value     Meta value to sanitize.
    10721073                 * @param string $meta_key       Meta key.
    1073                  * @param string $object_type    Object type.
     1074                 * @param string $object_type    Type of object this meta is registered to. Accepts any value with an associated meta table.
     1075                 *                               (e.g. comment, post, term, user, my_custom_meta)
    10741076                 * @param string $object_subtype Object subtype.
    10751077                 */
    10761078                return apply_filters( "sanitize_{$object_type}_meta_{$meta_key}_for_{$object_subtype}", $meta_value, $meta_key, $object_type, $object_subtype );
    function sanitize_meta( $meta_key, $meta_value, $object_type, $object_subtype = 
    10871089         *
    10881090         * @param mixed  $meta_value      Meta value to sanitize.
    10891091         * @param string $meta_key        Meta key.
    1090          * @param string $object_type     Object type.
     1092         * @param string $object_type     Type of object this meta is registered to. Accepts any value with an associated meta table.
     1093         *                                (e.g. comment, post, term, user, my_custom_meta)
    10911094         */
    10921095        return apply_filters( "sanitize_{$object_type}_meta_{$meta_key}", $meta_value, $meta_key, $object_type );
    10931096}
    function sanitize_meta( $meta_key, $meta_value, $object_type, $object_subtype = 
    11081111 *              `$sanitize_callback` and `$auth_callback` have been folded into this array.
    11091112 * @since 4.9.8 The `$object_subtype` argument was added to the arguments array.
    11101113 *
    1111  * @param string $object_type    Type of object this meta is registered to.
     1114 * @param string $object_type    Type of object this meta is registered to. Accepts any value with an associated meta table.
     1115 *                               (e.g. comment, post, term, user, my_custom_meta)
    11121116 * @param string $meta_key       Meta key to register.
    11131117 * @param array  $args {
    11141118 *     Data used to describe the meta key when registered.
    function register_meta( $object_type, $meta_key, $args, $deprecated = null ) { 
    11721176         *
    11731177         * @param array  $args        Array of meta registration arguments.
    11741178         * @param array  $defaults    Array of default arguments.
    1175          * @param string $object_type Object type.
     1179         * @param string $object_type Type of object this meta is registered to. Accepts any value with an associated meta table.
     1180         *                            (e.g. comment, post, term, user, my_custom_meta)
    11761181         * @param string $meta_key    Meta key.
    11771182         */
    11781183        $args = apply_filters( 'register_meta_args', $args, $defaults, $object_type, $meta_key );
    function register_meta( $object_type, $meta_key, $args, $deprecated = null ) { 
    12241229 * @since 4.6.0
    12251230 * @since 4.9.8 The `$object_subtype` parameter was added.
    12261231 *
    1227  * @param string $object_type    The type of object.
     1232 * @param string $object_type    Type of object this meta is registered to. Accepts any value with an associated meta table.
     1233 *                               (e.g. comment, post, term, user, my_custom_meta)
    12281234 * @param string $meta_key       The meta key.
    12291235 * @param string $object_subtype Optional. The subtype of the object type.
    12301236 *
    function registered_meta_key_exists( $object_type, $meta_key, $object_subtype = 
    12431249 * @since 4.6.0
    12441250 * @since 4.9.8 The `$object_subtype` parameter was added.
    12451251 *
    1246  * @param string $object_type    The type of object.
     1252 * @param string $object_type    Type of object this meta is registered to. Accepts any value with an associated meta table.
     1253 *                               (e.g. comment, post, term, user, my_custom_meta)
    12471254 * @param string $meta_key       The meta key.
    12481255 * @param string $object_subtype Optional. The subtype of the object type.
    12491256 * @return bool True if successful. False if the meta key was not registered.
    function unregister_meta_key( $object_type, $meta_key, $object_subtype = '' ) { 
    12921299 * @since 4.6.0
    12931300 * @since 4.9.8 The `$object_subtype` parameter was added.
    12941301 *
    1295  * @param string $object_type    The type of object. Post, comment, user, term.
     1302 * @param string $object_type    Type of object this meta is registered to. Accepts any value with an associated meta table.
     1303 *                               (e.g. comment, post, term, user, my_custom_meta)
    12961304 * @param string $object_subtype Optional. The subtype of the object type.
    12971305 * @return array List of registered meta keys.
    12981306 */
    function get_registered_meta_keys( $object_type, $object_subtype = '' ) { 
    13141322 *
    13151323 * @since 4.6.0
    13161324 *
    1317  * @param string $object_type Type of object to request metadata for. (e.g. comment, post, term, user)
     1325 * @param string $object_type Type of object this meta is registered to. Accepts any value with an associated meta table.
     1326 *                            (e.g. comment, post, term, user, my_custom_meta)
    13181327 * @param int    $object_id   ID of the object the metadata is for.
    13191328 * @param string $meta_key    Optional. Registered metadata key. If not specified, retrieve all registered
    13201329 *                            metadata for the specified object.
    function _wp_register_meta_args_whitelist( $args, $default_args ) { 
    13761385 *
    13771386 * @since 4.9.8
    13781387 *
    1379  * @param string $object_type Type of object to request metadata for. (e.g. comment, post, term, user)
     1388 * @param string $object_type Type of object this meta is registered to. Accepts any value with an associated meta table.
     1389 *                            (e.g. comment, post, term, user, my_custom_meta)
    13801390 * @param int    $object_id   ID of the object to retrieve its subtype.
    13811391 * @return string The object subtype or an empty string if unspecified subtype.
    13821392 */