Docs: Update @since version to 4.9.8 for meta registration subtype handling.

This feature has been backported to 4.9.8 so 5.0.0 is inaccurate.

See #38323.

Built from https://develop.svn.wordpress.org/trunk@43520


git-svn-id: http://core.svn.wordpress.org/trunk@43349 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
K. Adam White 2018-07-23 17:02:25 +00:00
parent 49fdd95ac0
commit a7735117b6
10 changed files with 21 additions and 21 deletions

View File

@ -304,7 +304,7 @@ function map_meta_cap( $cap, $user_id ) {
* and `$object_subtype`, refer to the metadata object type (comment, post, term or user), * and `$object_subtype`, refer to the metadata object type (comment, post, term or user),
* the meta key value, and the object subtype respectively. * the meta key value, and the object subtype respectively.
* *
* @since 5.0.0 * @since 4.9.8
* *
* @param bool $allowed Whether the user can add the object meta. Default false. * @param bool $allowed Whether the user can add the object meta. Default false.
* @param string $meta_key The meta key. * @param string $meta_key The meta key.
@ -350,7 +350,7 @@ function map_meta_cap( $cap, $user_id ) {
* *
* @since 4.6.0 As `auth_post_{$post_type}_meta_{$meta_key}`. * @since 4.6.0 As `auth_post_{$post_type}_meta_{$meta_key}`.
* @since 4.7.0 * @since 4.7.0
* @deprecated 5.0.0 Use `auth_{$object_type}_meta_{$meta_key}_for_{$object_subtype}` * @deprecated 4.9.8 Use `auth_{$object_type}_meta_{$meta_key}_for_{$object_subtype}`
* *
* @param bool $allowed Whether the user can add the object meta. Default false. * @param bool $allowed Whether the user can add the object meta. Default false.
* @param string $meta_key The meta key. * @param string $meta_key The meta key.
@ -359,7 +359,7 @@ function map_meta_cap( $cap, $user_id ) {
* @param string $cap Capability name. * @param string $cap Capability name.
* @param string[] $caps Array of the user's capabilities. * @param string[] $caps Array of the user's capabilities.
*/ */
$allowed = apply_filters_deprecated( "auth_{$object_type}_{$object_subtype}_meta_{$meta_key}", array( $allowed, $meta_key, $object_id, $user_id, $cap, $caps ), '5.0.0', "auth_{$object_type}_meta_{$meta_key}_for_{$object_subtype}" ); $allowed = apply_filters_deprecated( "auth_{$object_type}_{$object_subtype}_meta_{$meta_key}", array( $allowed, $meta_key, $object_id, $user_id, $cap, $caps ), '4.9.8', "auth_{$object_type}_meta_{$meta_key}_for_{$object_subtype}" );
} }
if ( ! $allowed ) { if ( ! $allowed ) {

View File

@ -974,7 +974,7 @@ function is_protected_meta( $meta_key, $meta_type = null ) {
* Sanitize meta value. * Sanitize meta value.
* *
* @since 3.1.3 * @since 3.1.3
* @since 5.0.0 The `$object_subtype` parameter was added. * @since 4.9.8 The `$object_subtype` parameter was added.
* *
* @param string $meta_key Meta key. * @param string $meta_key Meta key.
* @param mixed $meta_value Meta value to sanitize. * @param mixed $meta_value Meta value to sanitize.
@ -992,7 +992,7 @@ function sanitize_meta( $meta_key, $meta_value, $object_type, $object_subtype =
* and `$object_subtype`, refer to the metadata object type (comment, post, term or user), * and `$object_subtype`, refer to the metadata object type (comment, post, term or user),
* the meta key value, and the object subtype respectively. * the meta key value, and the object subtype respectively.
* *
* @since 5.0.0 * @since 4.9.8
* *
* @param mixed $meta_value Meta value to sanitize. * @param mixed $meta_value Meta value to sanitize.
* @param string $meta_key Meta key. * @param string $meta_key Meta key.
@ -1032,7 +1032,7 @@ function sanitize_meta( $meta_key, $meta_value, $object_type, $object_subtype =
* @since 4.6.0 {@link https://core.trac.wordpress.org/ticket/35658 Modified * @since 4.6.0 {@link https://core.trac.wordpress.org/ticket/35658 Modified
* to support an array of data to attach to registered meta keys}. Previous arguments for * to support an array of data to attach to registered meta keys}. Previous arguments for
* `$sanitize_callback` and `$auth_callback` have been folded into this array. * `$sanitize_callback` and `$auth_callback` have been folded into this array.
* @since 5.0.0 The `$object_subtype` argument was added to the arguments array. * @since 4.9.8 The `$object_subtype` argument was added to the arguments array.
* *
* @param string $object_type Type of object this meta is registered to. * @param string $object_type Type of object this meta is registered to.
* @param string $meta_key Meta key to register. * @param string $meta_key Meta key to register.
@ -1148,7 +1148,7 @@ function register_meta( $object_type, $meta_key, $args, $deprecated = null ) {
* Checks if a meta key is registered. * Checks if a meta key is registered.
* *
* @since 4.6.0 * @since 4.6.0
* @since 5.0.0 The `$object_subtype` parameter was added. * @since 4.9.8 The `$object_subtype` parameter was added.
* *
* @param string $object_type The type of object. * @param string $object_type The type of object.
* @param string $meta_key The meta key. * @param string $meta_key The meta key.
@ -1167,7 +1167,7 @@ function registered_meta_key_exists( $object_type, $meta_key, $object_subtype =
* Unregisters a meta key from the list of registered keys. * Unregisters a meta key from the list of registered keys.
* *
* @since 4.6.0 * @since 4.6.0
* @since 5.0.0 The `$object_subtype` parameter was added. * @since 4.9.8 The `$object_subtype` parameter was added.
* *
* @param string $object_type The type of object. * @param string $object_type The type of object.
* @param string $meta_key The meta key. * @param string $meta_key The meta key.
@ -1216,7 +1216,7 @@ function unregister_meta_key( $object_type, $meta_key, $object_subtype = '' ) {
* Retrieves a list of registered meta keys for an object type. * Retrieves a list of registered meta keys for an object type.
* *
* @since 4.6.0 * @since 4.6.0
* @since 5.0.0 The `$object_subtype` parameter was added. * @since 4.9.8 The `$object_subtype` parameter was added.
* *
* @param string $object_type The type of object. Post, comment, user, term. * @param string $object_type The type of object. Post, comment, user, term.
* @param string $object_subtype Optional. The subtype of the object type. * @param string $object_subtype Optional. The subtype of the object type.
@ -1300,7 +1300,7 @@ function _wp_register_meta_args_whitelist( $args, $default_args ) {
/** /**
* Returns the object subtype for a given object ID of a specific type. * Returns the object subtype for a given object ID of a specific type.
* *
* @since 5.0.0 * @since 4.9.8
* *
* @param string $object_type Type of object to request metadata for. (e.g. comment, post, term, user) * @param string $object_type Type of object to request metadata for. (e.g. comment, post, term, user)
* @param int $object_id ID of the object to retrieve its subtype. * @param int $object_id ID of the object to retrieve its subtype.
@ -1353,7 +1353,7 @@ function get_object_subtype( $object_type, $object_id ) {
* The dynamic portion of the hook, `$object_type`, refers to the object * The dynamic portion of the hook, `$object_type`, refers to the object
* type (post, comment, term, or user). * type (post, comment, term, or user).
* *
* @since 5.0.0 * @since 4.9.8
* *
* @param string $object_subtype Empty string to override. * @param string $object_subtype Empty string to override.
* @param int $object_id ID of the object to get the subtype for. * @param int $object_id ID of the object to get the subtype for.

View File

@ -1992,7 +1992,7 @@ function delete_post_meta_by_key( $post_meta_key ) {
/** /**
* Registers a meta key for posts. * Registers a meta key for posts.
* *
* @since 5.0.0 * @since 4.9.8
* *
* @param string $post_type Post type to register a meta key for. Pass an empty string * @param string $post_type Post type to register a meta key for. Pass an empty string
* to register the meta key across all existing post types. * to register the meta key across all existing post types.
@ -2010,7 +2010,7 @@ function register_post_meta( $post_type, $meta_key, array $args ) {
/** /**
* Unregisters a meta key for posts. * Unregisters a meta key for posts.
* *
* @since 5.0.0 * @since 4.9.8
* *
* @param string $post_type Post type the meta key is currently registered for. Pass * @param string $post_type Post type the meta key is currently registered for. Pass
* an empty string if the meta key is registered across all * an empty string if the meta key is registered across all

View File

@ -30,7 +30,7 @@ class WP_REST_Comment_Meta_Fields extends WP_REST_Meta_Fields {
/** /**
* Retrieves the object meta subtype. * Retrieves the object meta subtype.
* *
* @since 5.0.0 * @since 4.9.8
* *
* @return string 'comment' There are no subtypes. * @return string 'comment' There are no subtypes.
*/ */

View File

@ -27,7 +27,7 @@ abstract class WP_REST_Meta_Fields {
/** /**
* Retrieves the object meta subtype. * Retrieves the object meta subtype.
* *
* @since 5.0.0 * @since 4.9.8
* *
* @return string Subtype for the meta type, or empty string if no specific subtype. * @return string Subtype for the meta type, or empty string if no specific subtype.
*/ */

View File

@ -49,7 +49,7 @@ class WP_REST_Post_Meta_Fields extends WP_REST_Meta_Fields {
/** /**
* Retrieves the object meta subtype. * Retrieves the object meta subtype.
* *
* @since 5.0.0 * @since 4.9.8
* *
* @return string Subtype for the meta type, or empty string if no specific subtype. * @return string Subtype for the meta type, or empty string if no specific subtype.
*/ */

View File

@ -49,7 +49,7 @@ class WP_REST_Term_Meta_Fields extends WP_REST_Meta_Fields {
/** /**
* Retrieves the object meta subtype. * Retrieves the object meta subtype.
* *
* @since 5.0.0 * @since 4.9.8
* *
* @return string Subtype for the meta type, or empty string if no specific subtype. * @return string Subtype for the meta type, or empty string if no specific subtype.
*/ */

View File

@ -30,7 +30,7 @@ class WP_REST_User_Meta_Fields extends WP_REST_Meta_Fields {
/** /**
* Retrieves the object meta subtype. * Retrieves the object meta subtype.
* *
* @since 5.0.0 * @since 4.9.8
* *
* @return string 'user' There are no subtypes. * @return string 'user' There are no subtypes.
*/ */

View File

@ -1325,7 +1325,7 @@ function has_term_meta( $term_id ) {
/** /**
* Registers a meta key for terms. * Registers a meta key for terms.
* *
* @since 5.0.0 * @since 4.9.8
* *
* @param string $taxonomy Taxonomy to register a meta key for. Pass an empty string * @param string $taxonomy Taxonomy to register a meta key for. Pass an empty string
* to register the meta key across all existing taxonomies. * to register the meta key across all existing taxonomies.
@ -1343,7 +1343,7 @@ function register_term_meta( $taxonomy, $meta_key, array $args ) {
/** /**
* Unregisters a meta key for terms. * Unregisters a meta key for terms.
* *
* @since 5.0.0 * @since 4.9.8
* *
* @param string $taxonomy Taxonomy the meta key is currently registered for. Pass * @param string $taxonomy Taxonomy the meta key is currently registered for. Pass
* an empty string if the meta key is registered across all * an empty string if the meta key is registered across all

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.0-alpha-43519'; $wp_version = '5.0-alpha-43520';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.