pfeifferNet

Assets
in package

Register and enqueue the admin-specific stylesheets and JavaScript.

Tags
since
5.10.0
since
5.11.0

Deprecate global singleton.

since
6.0.0

Improve asset path and URL handling.

since
6.3.0

Use common asset functions.

since
6.4.0

Add editor styles.

Table of Contents

Constants

NOTICE_CONTAINER  = 'notice.php'
Admin notices container partial.

Properties

$helper  : Helper
The instance of the helper class.
$instances  : array<string|int, object>
The array of instances of this class and sub-classes.
$notice_container  : string
The fully qualified path to the admin notice container partial.

Methods

enqueue_editor_styles()  : void
Enqueue styles within the editor.
enqueue_scripts()  : void
Enqueue the JavaScript for the admin area.
enqueue_styles()  : void
Enqueue the stylesheets for the admin area.
get_instance()  : object
Creates and/or returns the instance of this class.
register_scripts()  : void
Register the JavaScript for the admin area.
register_styles()  : void
Register the stylesheets for the admin area.
__construct()  : void
Initialise the class.
get_inline_script()  : string
Get the inline javascript.

Constants

NOTICE_CONTAINER

Admin notices container partial.

protected string NOTICE_CONTAINER = 'notice.php'
Tags
since
5.5.0

Properties

$instances

The array of instances of this class and sub-classes.

protected static array<string|int, object> $instances = array()
Tags
since
5.11.0

$notice_container

The fully qualified path to the admin notice container partial.

protected string $notice_container = ''
Tags
since
5.5.0

Methods

enqueue_scripts()

Enqueue the JavaScript for the admin area.

public enqueue_scripts() : void
Tags
since
5.10.0

enqueue_styles()

Enqueue the stylesheets for the admin area.

public enqueue_styles() : void
Tags
since
5.10.0

get_instance()

Creates and/or returns the instance of this class.

public static get_instance() : object
Tags
since
5.11.0
Return values
object

The instance of this class.

register_scripts()

Register the JavaScript for the admin area.

public register_scripts() : void
  • The asset must start with a leading slash. It is relative to the assets directory.
Tags
since
5.10.0
uses
get_asset_path()
uses
get_asset_url()
uses
get_asset_version()

register_styles()

Register the stylesheets for the admin area.

public register_styles() : void
  • The asset must start with a leading slash. It is relative to the assets directory.
Tags
since
5.10.0
uses
get_asset_path()
uses
get_asset_url()
uses
get_asset_version()

__construct()

Initialise the class.

protected __construct() : void
Tags
since
5.10.0
since
6.0.0

Add asset locations.

uses
Helper

get_inline_script()

Get the inline javascript.

protected get_inline_script() : string
Tags
since
5.10.0
since
6.4.0

Return the inline javascript.

uses
Helper::strip_whitespace()
Return values
string

The inline javascript.


        
On this page

Search results