PHP Класс WPDKPostMeta

С версии: 1.5.13
Автор: =undo= ([email protected])
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$meta array List of meta key with property and label info.
$post WPDKPost An instance of WPDKPost class.

Открытые методы

Метод Описание
__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.

Описание методов

__construct() публичный Метод

Create aninstance of WPDKPostMeta class
public __construct ( WPDKPost $post = null ) : WPDKPostMeta
$post WPDKPost Optional. An instance of WPDKPost class.
Результат WPDKPostMeta

add() публичный Метод

Add a meta key.
public add ( string $meta_key, string $property = '', mixed $default = false, string $label = '' ) : array
$meta_key string Meta key.
$property string Optional. Object proprty name.
$default mixed Optional. Default value.
$label string Optional. Label definition.
Результат array

mapToPost() публичный Метод

Map the post meta property (if defined) to post.
public mapToPost ( boolean $create_property = true ) : WPDKPost
$create_property boolean Optional. Default TRUE when in the target object the property doesn't exists then it is dynamically created. Set FALSE to map only the existing properties.
Результат WPDKPost

meta() публичный Метод

$this->add( self::META_KEY_BANNER_EXTERNAL_URL, 'banner_external_url', '', __( 'External URL', WPXBANNERIZE_TEXTDOMAIN ) );
public meta ( ) : array
Результат array

update() публичный Метод

Update post meta by using WPDKPost object properties.
public update ( )

updateWithArray() публичный статический Метод

Update post meta by using an array.
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.

Описание свойств

$meta публичное свойство

List of meta key with property and label info.
public array $meta
Результат array

$post публичное свойство

An instance of WPDKPost class.
public WPDKPost $post
Результат WPDKPost