Summery Summery
Checks if a meta key is registered.
Syntax Syntax
Parameters 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 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
* array with 'schema' or 'prepare_callback' keys instead of a boolean. * } * @param string|array $deprecated Deprecated. Use `$args` instead. * @return bool True if the meta key was successfully registered in the global array, false if not. * Registering a meta key with distinct sanitize and auth callbacks will fire those callbacks,
Advertisement
Changelog Changelog
Version | Description |
---|---|
4.9.8 | The $object_subtype parameter was added. |
4.6.0 | Introduced. |