From 186815a60527e65ed8acd6bbff68973867b3ecbe Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 3 Feb 2026 19:31:46 +0000 Subject: [PATCH] Docs: Document the `$wp_meta_keys` global in meta registration functions. Follow-up to [37924]. Props noruzzaman, mukesh27. See #64224. Built from https://develop.svn.wordpress.org/trunk@61584 git-svn-id: http://core.svn.wordpress.org/trunk@60895 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/meta.php | 8 ++++++++ wp-includes/version.php | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/wp-includes/meta.php b/wp-includes/meta.php index 5f53c12bc3..c657c6c2e7 100644 --- a/wp-includes/meta.php +++ b/wp-includes/meta.php @@ -1397,6 +1397,8 @@ function sanitize_meta( $meta_key, $meta_value, $object_type, $object_subtype = * @since 6.4.0 The `$revisions_enabled` argument was added to the arguments array. * @since 6.7.0 The `label` argument was added to the arguments array. * + * @global array $wp_meta_keys Global registry for meta keys. + * * @param string $object_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term', * 'user', or any other object type with an associated meta table. * @param string $meta_key Meta key to register. @@ -1567,6 +1569,8 @@ function register_meta( $object_type, $meta_key, $args, $deprecated = null ) { * * @since 5.5.0 * + * @global array $wp_meta_keys Global registry for meta keys. + * * @param mixed $value Current value passed to filter. * @param int $object_id ID of the object metadata is for. * @param string $meta_key Metadata key. @@ -1646,6 +1650,8 @@ function registered_meta_key_exists( $object_type, $meta_key, $object_subtype = * @since 4.6.0 * @since 4.9.8 The `$object_subtype` parameter was added. * + * @global array $wp_meta_keys Global registry for meta keys. + * * @param string $object_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term', * 'user', or any other object type with an associated meta table. * @param string $meta_key Metadata key. @@ -1696,6 +1702,8 @@ function unregister_meta_key( $object_type, $meta_key, $object_subtype = '' ) { * @since 4.6.0 * @since 4.9.8 The `$object_subtype` parameter was added. * + * @global array $wp_meta_keys Global registry for meta keys. + * * @param string $object_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term', * 'user', or any other object type with an associated meta table. * @param string $object_subtype Optional. The subtype of the object type. Default empty string. diff --git a/wp-includes/version.php b/wp-includes/version.php index 5966228332..f613ddae61 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '7.0-alpha-61580'; +$wp_version = '7.0-alpha-61584'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.