Make WordPress Core

Ticket #52887: 52887.diff

File 52887.diff, 924 bytes (added by ribaricplusplus, 3 years ago)
  • src/wp-includes/meta.php

    diff --git a/src/wp-includes/meta.php b/src/wp-includes/meta.php
    index 8bdb9d3ae5..ac85ec1174 100644
    a b function sanitize_meta( $meta_key, $meta_value, $object_type, $object_subtype = 
    12361236 * If an object type does not support any subtypes, such as users or comments, you should commonly call this function
    12371237 * without passing a subtype.
    12381238 *
     1239 * One reason why registering a meta key would be necessary is to make it
     1240 * available in the REST API, with the posts endpoint for example. In that case
     1241 * `$sanitize_callback` will be used to sanitize user input coming through the
     1242 * API, and `$auth_callback` will be used to check permissions.
     1243 *
    12391244 * @since 3.3.0
    12401245 * @since 4.6.0 {@link https://core.trac.wordpress.org/ticket/35658 Modified
    12411246 *              to support an array of data to attach to registered meta keys}. Previous arguments for