public function add(string
$meta_type,
int
$object_id,
string
$meta_key,
mixed
$meta_value,
[boolean
$unique = false] )
Parameters
$meta_type
—
string
Type of object metadata is for (e.g., comment, post, or user)
$object_id
—
int
ID of the object metadata is for
$meta_key
—
string
Metadata key
$meta_value
—
mixed
Metadata value. Must be serializable if non-scalar.
$unique
—
boolean
Optional, default is false. Whether the specified metadata key should be unique for the object. If true, and the object already has a value for the specified metadata key, no change will be made