metadata_exists
metadata_exists ( $meta_type, $object_id, $meta_key )
Parameters:- (string) meta_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user', or any other object type with an associated meta table.
- (int) object_id ID of the object metadata is for.
- (string) meta_key Metadata key.
Returns:- (bool) Whether a meta field with the given key exists.
Defined at: - Introduced in WordPress: 3.3.0
- Deprecated in WordPress: —
Description
Determines if a meta field with the given key exists for the given object ID.