registered_meta_key_exists( string $object_type, string $meta_key, string $object_subtype = '' )
Checks if a meta key is registered.
Description Description
Parameters Parameters
- $object_type
-
(string) (Required) The type of object.
- $meta_key
-
(string) (Required) The meta key.
- $object_subtype
-
(string) (Optional) The subtype of the object type.
Default value: ''
Return Return
(bool) True if the meta key is registered to the object type and, if provided, the object subtype. False if not.
Source Source
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 ] ); }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
4.9.8 | The $object_subtype parameter was added. |
4.6.0 | Introduced. |