PHP 클래스 WPLib_Term_Model_Base, wplib

The Model Base Class for Terms
상속: extends WPLib_Model_Base
파일 보기 프로젝트 열기: wplib/wplib

공개 메소드들

메소드 설명
__construct ( object | integer | string | null $term, array $args = [] )
assign ( integer $object_id ) : int[] | WP_Error Associate the passed Object ID with this taxonomy term.
has_term ( ) : boolean Check to see if this instance has a valid term object in $_term property.
is_assigned ( integer $object_id ) : boolean | WP_Error Is the passed Object ID associated with this taxonomy term.
item_class ( ) : mixed Return the item class name defined for this model.
item_taxonomy ( ) : mixed | null Returns the TAXONOMY value for this model's item.
make_new ( array $args ) : WPLib_Term_Model_Base
object_ids ( ) : array | WP_Error Return array of object IDs associate with this taxonomy term.
permalink ( ) : string | WP_Error
set_term ( object $term ) : mixed | WP_Term | object
taxonomy ( )
term ( ) : WP_Term | object | null
term_description ( ) : string
term_id ( ) : integer
term_name ( ) : null | string
term_slug ( ) : null | string
unassign ( integer $object_id ) : boolean | WP_Error Associate the passed Object ID with this taxonomy term.
update_description ( string $new_description )
update_field ( string $field_name, string $new_value )
update_slug ( string $new_slug )

메소드 상세

__construct() 공개 메소드

public __construct ( object | integer | string | null $term, array $args = [] )
$term object | integer | string | null
$args array

assign() 공개 메소드

Associate the passed Object ID with this taxonomy term.
public assign ( integer $object_id ) : int[] | WP_Error
$object_id integer Likely a Post ID but can be other things
리턴 int[] | WP_Error

has_term() 공개 메소드

Check to see if this instance has a valid term object in $_term property.
public has_term ( ) : boolean
리턴 boolean

is_assigned() 공개 메소드

Is the passed Object ID associated with this taxonomy term.
public is_assigned ( integer $object_id ) : boolean | WP_Error
$object_id integer Likely a Post ID but can be other things
리턴 boolean | WP_Error

item_class() 정적인 공개 메소드

Assumes the Model class name is simply the Item class name with '_Model' on the end. App_Foo -> App_Foo_Model
static public item_class ( ) : mixed
리턴 mixed

item_taxonomy() 정적인 공개 메소드

Returns the TAXONOMY value for this model's item.
static public item_taxonomy ( ) : mixed | null
리턴 mixed | null

make_new() 정적인 공개 메소드

static public make_new ( array $args ) : WPLib_Term_Model_Base
$args array
리턴 WPLib_Term_Model_Base

object_ids() 공개 메소드

Return array of object IDs associate with this taxonomy term.
public object_ids ( ) : array | WP_Error
리턴 array | WP_Error

set_term() 공개 메소드

public set_term ( object $term ) : mixed | WP_Term | object
$term object
리턴 mixed | WP_Term | object

taxonomy() 공개 메소드

public taxonomy ( )

term() 공개 메소드

public term ( ) : WP_Term | object | null
리턴 WP_Term | object | null

term_description() 공개 메소드

public term_description ( ) : string
리턴 string

term_id() 공개 메소드

public term_id ( ) : integer
리턴 integer

term_name() 공개 메소드

public term_name ( ) : null | string
리턴 null | string

term_slug() 공개 메소드

public term_slug ( ) : null | string
리턴 null | string

unassign() 공개 메소드

Associate the passed Object ID with this taxonomy term.
public unassign ( integer $object_id ) : boolean | WP_Error
$object_id integer Likely a Post ID but can be other things
리턴 boolean | WP_Error

update_description() 공개 메소드

public update_description ( string $new_description )
$new_description string

update_field() 공개 메소드

public update_field ( string $field_name, string $new_value )
$field_name string
$new_value string

update_slug() 공개 메소드

public update_slug ( string $new_slug )
$new_slug string