registered_meta_key_exists( string $object_type, string $meta_key, string $object_subtype = '' )
Checks if a meta key is registered.
Parameters
- $object_type
-
(Required) Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user', or any other object type with an associated meta table.
- $meta_key
-
(Required) Metadata key.
- $object_subtype
-
(Optional) The subtype of the object type.
Default value: ''
Return
(bool) True if the meta key is registered to the object type and, if provided, the object subtype. False if not.
Source
File: wp-includes/meta.php
Changelog
Version | Description |
---|---|
4.9.8 | The $object_subtype parameter was added. |
4.6.0 | Introduced. |