Skip to content

Commit 899dbce

Browse files
Docs: Document the $wp_meta_keys global in meta registration functions.
Follow-up to [37924]. Props noruzzaman, mukesh27. See #64224. git-svn-id: https://develop.svn.wordpress.org/trunk@61584 602fd350-edb4-49c9-b593-d223f7449a82
1 parent e3b2db7 commit 899dbce

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/wp-includes/meta.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1397,6 +1397,8 @@ function sanitize_meta( $meta_key, $meta_value, $object_type, $object_subtype =
13971397
* @since 6.4.0 The `$revisions_enabled` argument was added to the arguments array.
13981398
* @since 6.7.0 The `label` argument was added to the arguments array.
13991399
*
1400+
* @global array $wp_meta_keys Global registry for meta keys.
1401+
*
14001402
* @param string $object_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term',
14011403
* 'user', or any other object type with an associated meta table.
14021404
* @param string $meta_key Meta key to register.
@@ -1567,6 +1569,8 @@ function register_meta( $object_type, $meta_key, $args, $deprecated = null ) {
15671569
*
15681570
* @since 5.5.0
15691571
*
1572+
* @global array $wp_meta_keys Global registry for meta keys.
1573+
*
15701574
* @param mixed $value Current value passed to filter.
15711575
* @param int $object_id ID of the object metadata is for.
15721576
* @param string $meta_key Metadata key.
@@ -1646,6 +1650,8 @@ function registered_meta_key_exists( $object_type, $meta_key, $object_subtype =
16461650
* @since 4.6.0
16471651
* @since 4.9.8 The `$object_subtype` parameter was added.
16481652
*
1653+
* @global array $wp_meta_keys Global registry for meta keys.
1654+
*
16491655
* @param string $object_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term',
16501656
* 'user', or any other object type with an associated meta table.
16511657
* @param string $meta_key Metadata key.
@@ -1696,6 +1702,8 @@ function unregister_meta_key( $object_type, $meta_key, $object_subtype = '' ) {
16961702
* @since 4.6.0
16971703
* @since 4.9.8 The `$object_subtype` parameter was added.
16981704
*
1705+
* @global array $wp_meta_keys Global registry for meta keys.
1706+
*
16991707
* @param string $object_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term',
17001708
* 'user', or any other object type with an associated meta table.
17011709
* @param string $object_subtype Optional. The subtype of the object type. Default empty string.

0 commit comments

Comments
 (0)