Uses
Uses | Description |
---|---|
wp-includes/meta.php: get_registered_meta_keys() | Retrieves a list of registered meta keys for an object type. |
Checks if a meta key is registered.
(string) (Required) Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user', or any other object type with an associated meta table.
(string) (Required) Metadata key.
(string) (Optional) The subtype of the object type.
Default value: ''
(bool) True if the meta key is registered to the object type and, if provided, the object subtype. False if not.
File: wp-includes/meta.php
function registered_meta_key_exists( $object_type, $meta_key, $object_subtype = '' ) { $meta_keys = get_registered_meta_keys( $object_type, $object_subtype ); return isset( $meta_keys[ $meta_key ] ); }
Version | Description |
---|---|
4.9.8 | The $object_subtype parameter was added. |
4.6.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/registered_meta_key_exists