pfeifferNet

Assets
in package

Register and enqueue the stylesheets and JavaScript used in both backend and public facing.

Tags
since
5.6.0
since
5.9.0

Moved from class-common.

since
5.11.0

Deprecated global singleton.

since
6.0.0

Improve asset path and URL handling.

since
6.3.0

Use common asset functions.

Table of Contents

Properties

$instances  : array<string|int, object>
The array of instances of this class and sub-classes.

Methods

enqueue_assets()  : void
Enqueue the common stylesheets and scripts.
get_instance()  : object
Creates and/or returns the instance of this class.
register_scripts()  : void
Register the common javaScript.
register_styles()  : void
Register the common stylesheets.
__construct()  : void
Initialise the class.

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

Methods

enqueue_assets()

Enqueue the common stylesheets and scripts.

public enqueue_assets() : void
Tags
since
6.0.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 common javaScript.

public register_scripts() : void

The asset must start with a leading slash. It is relative to the assets directory.

Tags
since
5.6.0
since
5.9.0

Change cache-busting strategy.

since
6.0.0

Add common script.

uses
get_asset_path()
uses
get_asset_url()
uses
get_asset_version()

register_styles()

Register the common stylesheets.

public register_styles() : void

The asset must start with a leading slash. It is relative to the assets directory.

Tags
since
5.8.0
since
5.9.0

Change cache busting strategy.

since
5.12.0

Add common style.

uses
get_asset_path()
uses
get_asset_url()
uses
get_asset_version()

__construct()

Initialise the class.

protected __construct() : void
Tags
since
5.11.0
since
6.0.0

Add asset locations.


        
On this page

Search results