PHP Class Papi_Page_Type, papi

Inheritance: extends Papi_Page_Type_Meta
Afficher le fichier Open project: wp-papi/papi Class Usage Examples

Méthodes publiques

Свойство 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

Свойство Type Description
$remove_meta_boxes array Remove meta boxes.

Méthodes publiques

Méthode 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.

Méthodes protégées

Méthode 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 méthode

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

allowed() public méthode

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

display() public méthode

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

get_body_classes() public méthode

Get body css classes.
public get_body_classes ( ) : array
Résultat array

get_child_types() public méthode

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

get_labels() public méthode

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

get_post_type() public méthode

Get post type.
public get_post_type ( ) : string
Résultat string

get_post_type_supports() protected méthode

Get post type supports that will be removed.
protected get_post_type_supports ( ) : array
Résultat array

get_thumbnail() public méthode

Get page type image thumbnail.
public get_thumbnail ( ) : string
Résultat string

has_post_type() public méthode

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

remove_meta_boxes() public méthode

Remove meta boxes.
public remove_meta_boxes ( )

remove_post_type_support() public méthode

Remove post type support action.

setup() public méthode

Setup page type.
public setup ( )

setup_post_types() protected méthode

Setup post types array.
protected setup_post_types ( )

Property Details

$capabilities public_oe property

Capabilities list.
public array $capabilities
Résultat array

$child_types public_oe property

The page types that lives under this page type.
public array $child_types
Résultat array

$description public_oe property

The description of the page type.
public string $description
Résultat string

$fill_labels public_oe property

Fill labels.
public bool $fill_labels
Résultat boolean

$labels public_oe property

Labels, the same labels that post type object uses.
public array $labels
Résultat array

$post_type public_oe property

The post types to register the page type with.
public array $post_type
Résultat array

$remove_meta_boxes protected_oe property

Remove meta boxes.
protected array $remove_meta_boxes
Résultat array

$show_page_attributes public_oe property

Show page attributes box.
public bool $show_page_attributes
Résultat boolean

$show_page_template public_oe property

Show page template dropdown.
public bool $show_page_template
Résultat boolean

$standard_type public_oe property

Show standard page type or not.
public bool $standard_type
Résultat boolean

$switcher public_oe property

Show page type switcher.
public bool $switcher
Résultat boolean

$template public_oe property

The template of the page type.
public string $template
Résultat string

$thumbnail public_oe property

The page type thumbnail.
public string $thumbnail
Résultat string

$type public_oe property

The type name.
public string $type
Résultat string