PHP Класс Admin_Apple_News_List_Table, apple-news

С версии: 0.4.0
Наследование: extends WP_List_Table
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$per_page integer How many entries per page will be displayed.
$settings Settings Current settings.

Открытые методы

Метод Описание
__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.

Защищенные методы

Метод Описание
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.

Приватные методы

Метод Описание
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.

Описание методов

__construct() публичный Метод

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

column_cb() публичный Метод

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
Результат string

column_default() публичный Метод

Set column defaults.
public column_default ( mixed $item, string $column_name ) : string
$item mixed
$column_name string
Результат string

column_title() публичный Метод

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
Результат string

date_range_filter_field() защищенный Метод

Display datepickers to filter by date range
protected date_range_filter_field ( )

extra_tablenav() защищенный Метод

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

get_bulk_actions() публичный Метод

Get bulk actions.
public get_bulk_actions ( ) : array
Результат array

get_columns() публичный Метод

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
Результат array An array where the key is the column slug and the value is the title text.

get_date_from_filter() защищенный Метод

Get the current date from filter value.
protected get_date_from_filter ( ) : string
Результат string

get_date_to_filter() защищенный Метод

Get the current date to filter value.
protected get_date_to_filter ( ) : string
Результат string

get_publish_status_filter() защищенный Метод

Get the current publish status filter value.
protected get_publish_status_filter ( ) : string
Результат string

get_search_filter() защищенный Метод

Get the current search filter value.
protected get_search_filter ( ) : string
Результат string

prepare_items() публичный Метод

Prepare items for the table.
public prepare_items ( )

publish_status_filter_field() защищенный Метод

Display a dropdown to filter by publish state.

Описание свойств

$per_page публичное свойство

How many entries per page will be displayed.
С версии: 0.4.0
public int $per_page
Результат integer

$settings публичное свойство

Current settings.
С версии: 0.9.0
public Settings $settings
Результат Settings