PHP Класс Carbon_Fields\Container\Term_Meta_Container

Наследование: extends Container
Показать файл Открыть проект

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

Свойство Тип Описание
$settings

Защищенные свойства (Protected)

Свойство Тип Описание
$term_id

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

Метод Описание
__construct ( string $title ) Create a new term meta fields container
attach ( ) Add term meta for each of the container taxonomies
detach ( ) Revert the result of attach()
init ( ) Bind attach() and save() to the appropriate WordPress actions.
is_valid_attach ( ) : boolean Perform checks whether the container should be attached during the current request
is_valid_save ( integer $term_id = null ) : boolean Perform checks whether the current save() request is valid.
render ( $term = null ) Output the container markup
save ( integer $term_id ) Perform save operation after successful is_valid_save() check.
set_term_id ( integer $term_id ) Set the term ID the container will operate with.
show_on_level ( integer $term_level ) : object Show the container only on particular term level.
show_on_taxonomy ( string | array $taxonomies ) : object Show the container only on terms from the specified taxonomies.

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

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

Create a new term meta fields container
public __construct ( string $title )
$title string Unique title of the container

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

Add term meta for each of the container taxonomies
public attach ( )

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

Revert the result of attach()
public detach ( )

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

Bind attach() and save() to the appropriate WordPress actions.
public init ( )

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

Perform checks whether the container should be attached during the current request
public is_valid_attach ( ) : boolean
Результат boolean True if the container is allowed to be attached

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

Perform checks whether the current save() request is valid.
public is_valid_save ( integer $term_id = null ) : boolean
$term_id integer ID of the term against which save() is ran
Результат boolean

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

Output the container markup
public render ( $term = null )

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

The call is propagated to all fields in the container.
public save ( integer $term_id )
$term_id integer ID of the term against which save() is ran

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

Set the term ID the container will operate with.
public set_term_id ( integer $term_id )
$term_id integer

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

Show the container only on particular term level.
public show_on_level ( integer $term_level ) : object
$term_level integer
Результат object $this

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

Show the container only on terms from the specified taxonomies.
public show_on_taxonomy ( string | array $taxonomies ) : object
$taxonomies string | array
Результат object $this

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

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

public $settings

$term_id защищенное свойство

protected $term_id