PHP Класс Papi_Page_Type, papi

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

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

Свойство Тип Описание
$capabilities array Capabilities list.
$child_types array The page types that lives under this page type.
$description string The description of the page type.
$fill_labels boolean Fill labels.
$labels array Labels, the same labels that post type object uses.
$post_type array The post types to register the page type with.
$show_page_attributes boolean Show page attributes box.
$show_page_template boolean Show page template dropdown.
$show_permalink boolean Show permalink edit box.
$standard_type boolean Show standard page type or not.
$switcher boolean Show page type switcher.
$template string The template of the page type.
$thumbnail string The page type thumbnail.
$type string The type name.

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

Свойство Тип Описание
$remove_meta_boxes array Remove meta boxes.

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

Метод Описание
__construct ( string $file_path = '' ) The constructor.
allowed ( ) : boolean Determine if the page type is allowed by capabilities and post type.
display ( string $post_type ) : boolean Should the Page Type be displayed in WordPress admin or not?
get_body_classes ( ) : array Get body css classes.
get_child_types ( ) : array Get child page types that lives under the current page type.
get_labels ( ) : array Get labels that should be changed when using fill_labels option.
get_post_type ( ) : string Get post type.
get_thumbnail ( ) : string Get page type image thumbnail.
has_post_type ( string $post_type ) : boolean Check if the given post is allowed to use the page type.
remove_meta_boxes ( ) Remove meta boxes.
remove_post_type_support ( ) Remove post type support action.
setup ( ) Setup page type.

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

Метод Описание
get_post_type_supports ( ) : array Get post type supports that will be removed.
setup_post_types ( ) Setup post types array.

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

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

Load a page type by the file.
public __construct ( string $file_path = '' )
$file_path string

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

Determine if the page type is allowed by capabilities and post type.
public allowed ( ) : boolean
Результат boolean

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

Should the Page Type be displayed in WordPress admin or not?
public display ( string $post_type ) : boolean
$post_type string
Результат boolean

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

Get body css classes.
public get_body_classes ( ) : array
Результат array

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

Get child page types that lives under the current page type.
public get_child_types ( ) : array
Результат array

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

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

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

Get post type.
public get_post_type ( ) : string
Результат string

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

Get post type supports that will be removed.
protected get_post_type_supports ( ) : array
Результат array

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

Get page type image thumbnail.
public get_thumbnail ( ) : string
Результат string

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

Check if the given post is allowed to use the page type.
public has_post_type ( string $post_type ) : boolean
$post_type string
Результат boolean

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

Remove meta boxes.
public remove_meta_boxes ( )

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

Remove post type support action.

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

Setup page type.
public setup ( )

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

Setup post types array.
protected setup_post_types ( )

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

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

Capabilities list.
public array $capabilities
Результат array

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

The page types that lives under this page type.
public array $child_types
Результат array

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

The description of the page type.
public string $description
Результат string

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

Fill labels.
public bool $fill_labels
Результат boolean

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

Labels, the same labels that post type object uses.
public array $labels
Результат array

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

The post types to register the page type with.
public array $post_type
Результат array

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

Remove meta boxes.
protected array $remove_meta_boxes
Результат array

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

Show page attributes box.
public bool $show_page_attributes
Результат boolean

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

Show page template dropdown.
public bool $show_page_template
Результат boolean

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

Show standard page type or not.
public bool $standard_type
Результат boolean

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

Show page type switcher.
public bool $switcher
Результат boolean

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

The template of the page type.
public string $template
Результат string

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

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

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

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