WPDK
1.5.0
WordPress Development Kit
|
Public Member Functions | |
__construct ($post) | |
Construct. More... | |
value ($key) | |
values ($key) | |
Static Public Member Functions | |
static | updatePostMetaWithDeleteIfNotSet ($id_post, $meta_key, $meta_value=null) |
Upd ate or delete a post meta. More... | |
Utility for post meta
Definition at line 839 of file wpdk-post.php.
__construct | ( | $post | ) |
Construct.
Create aninstance of WPDKPostMeta class
int | object | $post | Post ID, Post object |
Definition at line 859 of file wpdk-post.php.
|
static |
Upd ate or delete a post meta.
Update a post meta with key $meta_key
for post $id_post
. If value is NULL the post meta is deleted.
int | $id_post | Post ID |
string | $meta_key | Meta key |
string | null | $meta_value | Meta value. If NULL the post meta is deleted. |
Definition at line 873 of file wpdk-post.php.
value | ( | $key | ) |
Return a single value with a specific meta key
string | $key | A meta key |
Definition at line 901 of file wpdk-post.php.
values | ( | $key | ) |
Return ana array of values with a specific meta key
string | $key | A meta key |
Definition at line 920 of file wpdk-post.php.