Activity_Meta::add_metadata( int $object_id, string $meta_key, mixed $meta_value, bool $unique = false )
Wrapper method for add_metadata that can be overridden in sub classes.
Description Description
Parameters Parameters
- $object_id
-
(Required) ID of the object the metadata is for.
- $meta_key
-
(Required) Metadata key to use.
- $meta_value
-
(Required) Metadata value. Must be serializable if non-scalar.
- $unique
-
(Optional) 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.
Default value: false
Return Return
(int|false) The meta ID on success, false on failure.
Source Source
File: cli/src/activity-meta.php