metadata_exists

SummerySummery

Determines if a meta key is set for a given object.

Syntax

metadata_exists( string $meta_type, int $object_id, string $meta_key )

ParametersParameters

$meta_type

(string) (Required) Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user', or any other object type with an associated meta table.

$object_id

(int) (Required) ID of the object metadata is for.

$meta_key

(string) (Required) Metadata key.

ReturnReturn

(bool) True of the key is set, false if not.

SourceSource

File: wp-includes/meta.php


			

ChangelogChangelog

Changelog
Version Description
3.3.0 Introduced.
Scroll to Top