PHP Класс Papi_Entry_Type, papi

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

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

Свойство Тип Описание
$show_help_tabs Show help tabs.
$show_screen_options boolean Show screen options.
$type string The type name.

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

Свойство Тип Описание
$boxes array The array of meta boxes to register.
$load_boxes boolean Load all boxes.

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

Метод Описание
add_help_tabs ( ) Add help tabs.
body_classes ( ) : array Get custom admin body classes.
get_body_classes ( ) : array Get admin body css classes.
get_boxes ( ) : array Get boxes from the page type.
get_labels ( ) : array Get labels that should be changed when using fill_labels option.
get_properties ( ) : array Get root properties.
get_property ( string $slug, string $child_slug = '' ) : Papi_Property Get property from entry type.
help ( ) : array Add admin help tabs.
help_sidebar ( ) : boolean Add help sidebar content.
setup ( ) Setup entry type.
singleton ( ) : boolean Check if the entry type is a singleton.

Защищенные методы

Метод Описание
box ( mixed $file_or_options = [], array $properties = [] ) Add new meta box with properties.
call_parent_register ( ) Call parent register if it exists to collect boxes on the parent entry type.
convert_properties ( array | object $properties ) : array Convert properties to properties objects.
merge_boxes ( array $boxes ) : array Merge boxes with same title.
property ( array | string $file_or_options = [], array $values = [] ) : null | Papi_Property Add new property to the page using array or rendering property template file.
tab ( mixed $file_or_options = [], array $properties = [] ) : null | Papi_Core_Tab Add a new tab.
template ( string $file, array $values = [] ) : array Load template file.

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

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

Add help tabs.
public add_help_tabs ( )

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

Get custom admin body classes.
public body_classes ( ) : array
Результат array

box() защищенный Метод

Add new meta box with properties.
protected box ( mixed $file_or_options = [], array $properties = [] )
$file_or_options mixed
$properties array

call_parent_register() защищенный Метод

Call parent register if it exists to collect boxes on the parent entry type.
protected call_parent_register ( )

convert_properties() защищенный Метод

Convert properties to properties objects.
protected convert_properties ( array | object $properties ) : array
$properties array | object
Результат array

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

Use body_classes method to add custom admin body classes.
public get_body_classes ( ) : array
Результат array

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

Get boxes from the page type.
public get_boxes ( ) : array
Результат array

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

Get labels that should be changed when using fill_labels option.
public get_labels ( ) : array
Результат array

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

Get root properties.
public get_properties ( ) : array
Результат array

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

Get property from entry type.
public get_property ( string $slug, string $child_slug = '' ) : Papi_Property
$slug string
$child_slug string
Результат Papi_Property

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

Example: 'My custom title' => 'My custom content'
public help ( ) : array
Результат array

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

By default we return false to disable the sidebar content.
public help_sidebar ( ) : boolean
Результат boolean

merge_boxes() защищенный Метод

Merge boxes with same title.
protected merge_boxes ( array $boxes ) : array
$boxes array
Результат array

property() защищенный Метод

Add new property to the page using array or rendering property template file.
protected property ( array | string $file_or_options = [], array $values = [] ) : null | Papi_Property
$file_or_options array | string
$values array
Результат null | Papi_Property

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

Setup entry type.
public setup ( )

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

Check if the entry type is a singleton.
public singleton ( ) : boolean
Результат boolean

tab() защищенный Метод

Add a new tab.
protected tab ( mixed $file_or_options = [], array $properties = [] ) : null | Papi_Core_Tab
$file_or_options mixed
$properties array
Результат null | Papi_Core_Tab

template() защищенный Метод

Load template file.
protected template ( string $file, array $values = [] ) : array
$file string
$values array
Результат array

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

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

The array of meta boxes to register.
protected array $boxes
Результат array

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

Load all boxes.
protected bool $load_boxes
Результат boolean

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

Show help tabs.
public $show_help_tabs

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

Show screen options.
public bool $show_screen_options
Результат boolean

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

The type name.
public string $type
Результат string