PHP Класс Admin_Apple_Index_Page, apple-news

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

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

Метод Описание
__construct ( $settings ) Constructor.
action_query_params ( string $action, string $url ) : string Helps build query params for each row action.
admin_page ( ) Decide which template to load for the Apple News admin page
export_action ( integer $id ) Handles an export action.
namespace_action ( string $action ) : string Adds a namespace to all actions
page_router ( ) : mixed Sets up all pages used in the plugin's admin page. Associate each route with an action. Actions are methods that end with "_action" and must perform a task and output HTML with the result.
setup_admin_page ( ) Sets up the admin page.
setup_assets ( string $hook ) Sets up admin assets.
show_post_list_action ( ) Shows the list of articles available for publishing to Apple News.

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

Метод Описание
delete_action ( integer $id ) Handles a delete from Apple News action.
do_redirect ( ) Performs the redirect after an action is complete.
download_json ( string $json, integer $id ) Downloads the JSON file for troubleshooting purposes.
get_setting ( string $name ) : mixed Gets a setting by name which was loaded from WordPress options.
notice_error ( string $message ) Shows an error message.
notice_success ( string $message ) Shows a success message.
push_action ( integer $id ) Handles a push to Apple News action.

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

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

Constructor.
public __construct ( $settings )

action_query_params() публичный статический метод

Helps build query params for each row action.
public static action_query_params ( string $action, string $url ) : string
$action string
$url string
Результат string

admin_page() публичный метод

Decide which template to load for the Apple News admin page
public admin_page ( )

export_action() публичный метод

Handles an export action.
public export_action ( integer $id )
$id integer

namespace_action() публичный статический метод

Adds a namespace to all actions
public static namespace_action ( string $action ) : string
$action string
Результат string

page_router() публичный метод

FIXME: Regarding this class doing too much, maybe split all actions into their own class.
С версии: 0.4.0
public page_router ( ) : mixed
Результат mixed

setup_admin_page() публичный метод

Sets up the admin page.
public setup_admin_page ( )

setup_assets() публичный метод

Sets up admin assets.
public setup_assets ( string $hook )
$hook string

show_post_list_action() публичный метод

Shows the list of articles available for publishing to Apple News.