PHP Class Admin_Apple_Index_Page, apple-news

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

Méthodes publiques

Méthode Description
__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.

Private Methods

Méthode Description
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.

Method Details

__construct() public méthode

Constructor.
public __construct ( $settings )

action_query_params() public static méthode

Helps build query params for each row action.
public static action_query_params ( string $action, string $url ) : string
$action string
$url string
Résultat string

admin_page() public méthode

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

export_action() public méthode

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

namespace_action() public static méthode

Adds a namespace to all actions
public static namespace_action ( string $action ) : string
$action string
Résultat string

page_router() public méthode

FIXME: Regarding this class doing too much, maybe split all actions into their own class.
Since: 0.4.0
public page_router ( ) : mixed
Résultat mixed

setup_admin_page() public méthode

Sets up the admin page.
public setup_admin_page ( )

setup_assets() public méthode

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

show_post_list_action() public méthode

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