PHP Класс WPLib_Term_Model_Base, wplib

The Model Base Class for Terms
Наследование: extends WPLib_Model_Base
Показать файл Открыть проект

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

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