PHP Class Papi_Admin_Columns, papi

Show file Open project: wp-papi/papi

Protected Properties

Property Type Description
$post_type string Current post type.
$taxonomy string Current taxonomy.

Public Methods

Method Description
__construct ( ) The constructor.
manage_page_type_posts_columns ( array $defaults = [] ) : array Add custom table header to page or taxonomy type.
manage_page_type_posts_custom_column ( string $column_name, integer $post_id, integer $term_id = null ) Add custom table column to page or taxonomy type.
pre_get_posts ( WP_Query $query ) : WP_Query Filter posts on load if page_type query string is set.
restrict_page_types ( ) Filter page types in post type list.

Protected Methods

Method Description
get_meta_type_value ( ) : string Get meta type value.
setup_actions ( ) Setup actions.
setup_filters ( ) Setup filters.
setup_globals ( ) Setup globals.

Method Details

__construct() public method

The constructor.
public __construct ( )

get_meta_type_value() protected method

Get meta type value.
protected get_meta_type_value ( ) : string
return string

manage_page_type_posts_columns() public method

Add custom table header to page or taxonomy type.
public manage_page_type_posts_columns ( array $defaults = [] ) : array
$defaults array
return array

manage_page_type_posts_custom_column() public method

Add custom table column to page or taxonomy type.
public manage_page_type_posts_custom_column ( string $column_name, integer $post_id, integer $term_id = null )
$column_name string
$post_id integer
$term_id integer

pre_get_posts() public method

Filter posts on load if page_type query string is set.
public pre_get_posts ( WP_Query $query ) : WP_Query
$query WP_Query
return WP_Query

restrict_page_types() public method

Filter page types in post type list.
public restrict_page_types ( )

setup_actions() protected method

Setup actions.
protected setup_actions ( )

setup_filters() protected method

Setup filters.
protected setup_filters ( )

setup_globals() protected method

Setup globals.
protected setup_globals ( )

Property Details

$post_type protected property

Current post type.
protected string $post_type
return string

$taxonomy protected property

Current taxonomy.
protected string $taxonomy
return string