PHP Class Papi_Page_Type, papi

Inheritance: extends Papi_Page_Type_Meta
Mostrar archivo Open project: wp-papi/papi Class Usage Examples

Public Properties

Property Type Description
$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 Properties

Property Type Description
$remove_meta_boxes array Remove meta boxes.

Public Methods

Method Description
__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.

Protected Methods

Method Description
get_post_type_supports ( ) : array Get post type supports that will be removed.
setup_post_types ( ) Setup post types array.

Method Details

__construct() public method

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

allowed() public method

Determine if the page type is allowed by capabilities and post type.
public allowed ( ) : boolean
return boolean

display() public method

Should the Page Type be displayed in WordPress admin or not?
public display ( string $post_type ) : boolean
$post_type string
return boolean

get_body_classes() public method

Get body css classes.
public get_body_classes ( ) : array
return array

get_child_types() public method

Get child page types that lives under the current page type.
public get_child_types ( ) : array
return array

get_labels() public method

Get labels that should be changed when using fill_labels option.
public get_labels ( ) : array
return array

get_post_type() public method

Get post type.
public get_post_type ( ) : string
return string

get_post_type_supports() protected method

Get post type supports that will be removed.
protected get_post_type_supports ( ) : array
return array

get_thumbnail() public method

Get page type image thumbnail.
public get_thumbnail ( ) : string
return string

has_post_type() public method

Check if the given post is allowed to use the page type.
public has_post_type ( string $post_type ) : boolean
$post_type string
return boolean

remove_meta_boxes() public method

Remove meta boxes.
public remove_meta_boxes ( )

remove_post_type_support() public method

Remove post type support action.

setup() public method

Setup page type.
public setup ( )

setup_post_types() protected method

Setup post types array.
protected setup_post_types ( )

Property Details

$capabilities public_oe property

Capabilities list.
public array $capabilities
return array

$child_types public_oe property

The page types that lives under this page type.
public array $child_types
return array

$description public_oe property

The description of the page type.
public string $description
return string

$fill_labels public_oe property

Fill labels.
public bool $fill_labels
return boolean

$labels public_oe property

Labels, the same labels that post type object uses.
public array $labels
return array

$post_type public_oe property

The post types to register the page type with.
public array $post_type
return array

$remove_meta_boxes protected_oe property

Remove meta boxes.
protected array $remove_meta_boxes
return array

$show_page_attributes public_oe property

Show page attributes box.
public bool $show_page_attributes
return boolean

$show_page_template public_oe property

Show page template dropdown.
public bool $show_page_template
return boolean

$standard_type public_oe property

Show standard page type or not.
public bool $standard_type
return boolean

$switcher public_oe property

Show page type switcher.
public bool $switcher
return boolean

$template public_oe property

The template of the page type.
public string $template
return string

$thumbnail public_oe property

The page type thumbnail.
public string $thumbnail
return string

$type public_oe property

The type name.
public string $type
return string