PHP Class Admin_Apple_News_List_Table, apple-news

Since: 0.4.0
Inheritance: extends WP_List_Table
Afficher le fichier Open project: alleyinteractive/apple-news Class Usage Examples

Méthodes publiques

Свойство Type Description
$per_page integer How many entries per page will be displayed.
$settings Settings Current settings.

Méthodes publiques

Méthode Description
__construct ( Settings $settings ) Constructor.
column_cb ( WP_Post $item ) : string Required IF using checkboxes or bulk actions. The 'cb' column gets special treatment when columns are processed. It ALWAYS needs to have it's own method.
column_default ( mixed $item, string $column_name ) : string Set column defaults.
column_title ( WP_Post $item ) : string This method is responsible for what is rendered in any column with a name/slug of 'title'.
get_bulk_actions ( ) : array Get bulk actions.
get_columns ( ) : array Dictates the table columns and titles. The 'cb' column is special and, if existant, there needs to be a column_cb method defined.
prepare_items ( ) Prepare items for the table.

Méthodes protégées

Méthode Description
date_range_filter_field ( ) Display datepickers to filter by date range
extra_tablenav ( string $which ) Display extra filtering options.
get_date_from_filter ( ) : string Get the current date from filter value.
get_date_to_filter ( ) : string Get the current date to filter value.
get_publish_status_filter ( ) : string Get the current publish status filter value.
get_search_filter ( ) : string Get the current search filter value.
publish_status_filter_field ( ) Display a dropdown to filter by publish state.

Private Methods

Méthode Description
get_status_for ( WP_Post $post ) : string Get the Apple News status.
get_synced_status_for ( WP_Post $post ) : string Get the synced status.
get_updated_at ( WP_Post $post ) : string Get the updated at time.

Method Details

__construct() public méthode

Constructor.
public __construct ( Settings $settings )
$settings Settings

column_cb() public méthode

Required IF using checkboxes or bulk actions. The 'cb' column gets special treatment when columns are processed. It ALWAYS needs to have it's own method.
public column_cb ( WP_Post $item ) : string
$item WP_Post
Résultat string

column_default() public méthode

Set column defaults.
public column_default ( mixed $item, string $column_name ) : string
$item mixed
$column_name string
Résultat string

column_title() public méthode

Every time the class needs to render a column, it first looks for a method named column_{$column_title}, if it exists, that method is run, otherwise, column_default() is called. Actions can be generated here.
public column_title ( WP_Post $item ) : string
$item WP_Post
Résultat string

date_range_filter_field() protected méthode

Display datepickers to filter by date range
protected date_range_filter_field ( )

extra_tablenav() protected méthode

Display extra filtering options.
protected extra_tablenav ( string $which )
$which string

get_bulk_actions() public méthode

Get bulk actions.
public get_bulk_actions ( ) : array
Résultat array

get_columns() public méthode

Dictates the table columns and titles. The 'cb' column is special and, if existant, there needs to be a column_cb method defined.
public get_columns ( ) : array
Résultat array An array where the key is the column slug and the value is the title text.

get_date_from_filter() protected méthode

Get the current date from filter value.
protected get_date_from_filter ( ) : string
Résultat string

get_date_to_filter() protected méthode

Get the current date to filter value.
protected get_date_to_filter ( ) : string
Résultat string

get_publish_status_filter() protected méthode

Get the current publish status filter value.
protected get_publish_status_filter ( ) : string
Résultat string

get_search_filter() protected méthode

Get the current search filter value.
protected get_search_filter ( ) : string
Résultat string

prepare_items() public méthode

Prepare items for the table.
public prepare_items ( )

publish_status_filter_field() protected méthode

Display a dropdown to filter by publish state.

Property Details

$per_page public_oe property

How many entries per page will be displayed.
Since: 0.4.0
public int $per_page
Résultat integer

$settings public_oe property

Current settings.
Since: 0.9.0
public Settings $settings
Résultat Settings