PHP 클래스 WPDKPostMeta

부터: 1.5.13
저자: =undo= ([email protected])
파일 보기 프로젝트 열기: wpxtreme/wpdk

공개 프로퍼티들

프로퍼티 타입 설명
$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