PHP Class The_SEO_Framework\Admin_Init

Initializes the plugin for the wp-admin screens. Enqueues CSS and Javascript.
Since: 2.7.1
Inheritance: extends Init
显示文件 Open project: sybrew/the-seo-framework

Public Properties

Property Type Description
$css_name CSS script name identifier to be used with enqueuing.
$js_name JavaScript name identifier to be used with enqueuing.

Protected Properties

Property Type Description
$page_base_file The page base file.

Public Methods

Method Description
admin_redirect ( string $page, array $query_args = [] ) : null Redirect the user to an admin page, and add query args to the URL string for alerts, etc.
enqueue_admin_css ( $hook ) CSS for the AutoDescription Bar
enqueue_admin_javascript ( string $hook ) Enqueues scripts.
enqueue_admin_scripts ( string $hook ) Enqueues scripts in the admin area on the supported screens.
init_admin_scripts ( $direct = false ) Registers admin scripts and styles.
localize_admin_javascript ( ) Localizes admin javascript.
register_admin_javascript ( ) Registers admin CSS.
wp_ajax_update_counter_type ( ) Handles counter option update on AJAX request.

Protected Methods

Method Description
__construct ( ) Constructor. Loads parent constructor, registers script names and adds actions.
get_javascript_l10n ( ) : array Generate Javascript Localization.
register_admin_css ( ) Registers Admin CSS.

Method Details

__construct() protected method

Constructor. Loads parent constructor, registers script names and adds actions.
protected __construct ( )

admin_redirect() public method

Redirect the user to an admin page, and add query args to the URL string for alerts, etc.
Since: 2.2.2
public admin_redirect ( string $page, array $query_args = [] ) : null
$page string Menu slug.
$query_args array Optional. Associative array of query string arguments (key => value). Default is an empty array.
return null Return early if first argument is false.

enqueue_admin_css() public method

CSS for the AutoDescription Bar
Since: 2.1.9
public enqueue_admin_css ( $hook )
$hook the current page

enqueue_admin_javascript() public method

Enqueues scripts.
Since: 2.0.2
public enqueue_admin_javascript ( string $hook )
$hook string The current page hook.

enqueue_admin_scripts() public method

Enqueues scripts in the admin area on the supported screens.
Since: 2.3.3
public enqueue_admin_scripts ( string $hook )
$hook string The current page hook.

get_javascript_l10n() protected method

Generate Javascript Localization.
Since: 2.6.0
Since: 2.7.0 Added AJAX nonce: 'autodescription-ajax-nonce'
Since: 2.7.1 Added input detection: 'hasInput'
protected get_javascript_l10n ( ) : array
return array $strings The l10n strings.

init_admin_scripts() public method

Registers admin scripts and styles.
Since: 2.6.0
public init_admin_scripts ( $direct = false )

localize_admin_javascript() public method

Localizes admin javascript.
Since: 2.5.2.2

register_admin_css() protected method

Registers Admin CSS.
Since: 2.6.0
protected register_admin_css ( )

register_admin_javascript() public method

Registers admin CSS.
Since: 2.6.0

wp_ajax_update_counter_type() public method

Handles counter option update on AJAX request.
Since: 2.6.0

Property Details

$css_name public_oe property

CSS script name identifier to be used with enqueuing.
Since: 2.6.0
public $css_name

$js_name public_oe property

JavaScript name identifier to be used with enqueuing.
Since: 2.5.2.2
public $js_name

$page_base_file protected_oe property

The page base file.
Since: 2.5.2.2
protected $page_base_file