Property | Type | Description | |
---|---|---|---|
$meta | array | List of meta key with property and label info. | |
$post | WPDKPost | An instance of WPDKPost class. |
Method | Description | |
---|---|---|
__construct ( WPDKPost $post = null ) : WPDKPostMeta | Create aninstance of WPDKPostMeta class | |
add ( string $meta_key, string $property = '', mixed $default = false, string $label = '' ) : array | Add a meta key. | |
mapToPost ( boolean $create_property = true ) : WPDKPost | Map the post meta property (if defined) to post. | |
meta ( ) : array | Register meta keys. Use | |
update ( ) | Update post meta by using WPDKPost object properties. | |
updateWithArray ( integer $post_id, array $values ) | Update post meta by using an array. |
public __construct ( WPDKPost $post = null ) : WPDKPostMeta | ||
$post | WPDKPost | Optional. An instance of WPDKPost class. |
return | WPDKPostMeta |
public static updateWithArray ( integer $post_id, array $values ) | ||
$post_id | integer | The post ID. |
$values | array | A key value pairs array with key as post meta key and value as post meta value. |
public array $meta | ||
return | array |