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.