PHP Class Papi_Core_Type, papi

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

Méthodes publiques

Свойство Type Description
$name string The name of the core type.
$sort_order integer The sort order of the core type.
$type string The type name. Used for WP CLI.

Protected Properties

Свойство Type Description
$_class_name string The page type class name.
$_file_path string The file path of the core type file.

Méthodes publiques

Méthode Description
__construct ( string $file_path = '' ) The constructor.
allowed ( ) : boolean Determine if the entry type is allowed.
boot ( ) Boot page type.
get_class_name ( ) : string Get the page type class name with namespace if exists.
get_file_path ( ) : string Get the page type file pat.h
get_id ( ) : string Get the page type identifier.
get_type ( ) : string Get type name.
has_name ( ) : boolean Check so we have a name on the page type.
match_id ( string $id ) : boolean Check if the the given identifier match the page type identifier.
new_class ( ) : null | object Create a new instance of the page type file.

Méthodes protégées

Méthode Description
get_meta ( ) : array Get meta data from type class and merge with the parent meta data.
setup_actions ( ) Setup actions.
setup_file ( string $file_path ) Load the file and setup file path, file name and class name properties.
setup_filters ( ) Setup filters.
setup_meta_data ( ) Setup meta data.

Method Details

__construct() public méthode

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

allowed() public méthode

Determine if the entry type is allowed.
public allowed ( ) : boolean
Résultat boolean

boot() public méthode

Boot page type.
public boot ( )

get_class_name() public méthode

Get the page type class name with namespace if exists.
public get_class_name ( ) : string
Résultat string

get_file_path() public méthode

Get the page type file pat.h
public get_file_path ( ) : string
Résultat string

get_id() public méthode

Get the page type identifier.
public get_id ( ) : string
Résultat string

get_meta() protected méthode

Get meta data from type class and merge with the parent meta data.
protected get_meta ( ) : array
Résultat array

get_type() public méthode

Get type name.
public get_type ( ) : string
Résultat string

has_name() public méthode

Check so we have a name on the page type.
public has_name ( ) : boolean
Résultat boolean

match_id() public méthode

Check if the the given identifier match the page type identifier.
public match_id ( string $id ) : boolean
$id string
Résultat boolean

new_class() public méthode

Create a new instance of the page type file.
public new_class ( ) : null | object
Résultat null | object

setup_actions() protected méthode

Setup actions.
protected setup_actions ( )

setup_file() protected méthode

Load the file and setup file path, file name and class name properties.
protected setup_file ( string $file_path )
$file_path string

setup_filters() protected méthode

Setup filters.
protected setup_filters ( )

setup_meta_data() protected méthode

Setup meta data.
protected setup_meta_data ( )

Property Details

$_class_name protected_oe property

The page type class name.
protected string $_class_name
Résultat string

$_file_path protected_oe property

The file path of the core type file.
protected string $_file_path
Résultat string

$name public_oe property

The name of the core type.
public string $name
Résultat string

$sort_order public_oe property

The sort order of the core type.
public int $sort_order
Résultat integer

$type public_oe property

The type name. Used for WP CLI.
public string $type
Résultat string