PHP Класс WPAS_CF_Taxonomy

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

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

Свойство Тип Описание
$ordered_terms The taxonomy terms ordered hierarchically.
$terms The taxonomy terms.

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

Метод Описание
__construct ( $field_id, $field )
add_select2_class ( array $classes, array $field ) : array Add the select2 class to the input
display ( ) : string Return the field markup for the front-end.
display_admin ( ) Return the field markup for the admin.
display_no_edit ( ) Return the field markup for the admin.
update ( integer $value, integer $post_id ) : integer Save function.

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

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

public __construct ( $field_id, $field )

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

Add the select2 class to the input
С версии: 3.3
public add_select2_class ( array $classes, array $field ) : array
$classes array Input classes
$field array Array of params of the field being processed
Результат array

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

Return the field markup for the front-end.
public display ( ) : string
Результат string Field markup

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

This method is only used if the current user has the capability to edit the field.
public display_admin ( )

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

This method is only used if the current user doesn't have the capability to edit the field.
public display_no_edit ( )

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

Taxonomies are saved differently as they are not stored as post metas but actual taxonomy terms.
С версии: 3.2.0
public update ( integer $value, integer $post_id ) : integer
$value integer New value
$post_id integer ID of the post being saved
Результат integer Result of the update

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

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

The taxonomy terms ordered hierarchically.
С версии: 3.2.0
protected $ordered_terms

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

The taxonomy terms.
С версии: 3.2.0
protected $terms