WPDK  1.5.0
WordPress Development Kit
 All Data Structures Files Functions Variables Pages
WPDKPostMeta Class Reference

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...
 

Detailed Description

Utility for post meta

Author
=undo= info@.nosp@m.wpxt.nosp@m.re.me
Date
2012-11-28
Version
0.8.1
Deprecated:
Since 0.9 - Not useful - Used by wpx-smartshop-product-metabox.php (WPXSmartShopProductMetaBox)

Definition at line 839 of file wpdk-post.php.

Constructor & Destructor Documentation

__construct (   $post)

Construct.

Create aninstance of WPDKPostMeta class

Parameters
int | object$postPost ID, Post object
Returns
WPDKPostMeta

Definition at line 859 of file wpdk-post.php.

Member Function Documentation

static updatePostMetaWithDeleteIfNotSet (   $id_post,
  $meta_key,
  $meta_value = null 
)
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.

Parameters
int$id_postPost ID
string$meta_keyMeta key
string | null$meta_valueMeta 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

Parameters
string$keyA meta key
Returns
mixed|null

Definition at line 901 of file wpdk-post.php.

values (   $key)

Return ana array of values with a specific meta key

Parameters
string$keyA meta key
Returns
array|null

Definition at line 920 of file wpdk-post.php.


The documentation for this class was generated from the following file: