create()
create(integer $post_id, string $meta_key, mixed $meta_value, boolean $unique = false) : integer|false
Add meta data field to a post.
Parameters
integer | $post_id | Post ID. |
string | $meta_key | Metadata name. |
mixed | $meta_value | Metadata value. Must be serializable if non-scalar. |
boolean | $unique | Optional. Whether the same key should not be added. Default false. |
Returns
integer|false —Meta ID on success, false on failure.