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


Top ↑

Return Return

(int|false) The meta ID on success, false on failure.


Top ↑

Source Source

File: cli/src/activity-meta.php


			

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.