pfeifferNet

Assets
in package

Enqueue the stylesheet and JavaScript for the frontend of the site.

.

Tags
since
5.9.0
since
5.11.0

Deprecate global singleton.

since
6.0.0

Improve asset path and URL handling.

Table of Contents

Constants

GOOGLE_RECAPTCHA_SCRIPT_URL  = 'https://www.google.com/recaptcha/api.js'
Google reCAPTCHA script URL.

Properties

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

Methods

enqueue_assets()  : void
Enqueue the stylesheets and script for the public-facing side of the site.
get_instance()  : object
Creates and/or returns the instance of this class.
register_scripts()  : void
Register the JavaScript for the public-facing side of the site.
register_styles()  : void
Register the stylesheets for the public-facing side of the site.
__construct()  : void
Initialise the class.

Constants

GOOGLE_RECAPTCHA_SCRIPT_URL

Google reCAPTCHA script URL.

protected string GOOGLE_RECAPTCHA_SCRIPT_URL = 'https://www.google.com/recaptcha/api.js'
Tags
since
5.9.0

Properties

$google_recaptcha_site_key

Google reCAPTCHA site key.

protected string $google_recaptcha_site_key = ''
Tags
since
6.3.0

$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 stylesheets and script for the public-facing side of the site.

public enqueue_assets() : void
  • Enqueue the form stylesheet on single posts, 404 pages and search results pages only.
  • Enqueue the form script on single posts only when comments are open.
Tags
since
5.9.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 public-facing side of the site.

public register_scripts() : void
  • The asset must start with a leading slash. It is relative to the assets directory.
Tags
since
5.9.0
since
6.2.0

Add simplelightbox JavaScript. Moved from pGallery plugin.

link
https://github.com/andreknieriem/simplelightbox
uses
get_asset_path()
uses
get_asset_url()
uses
get_asset_version()
uses
get_vendor_asset_path()
uses
get_vendor_asset_url()

register_styles()

Register the stylesheets for the public-facing side of the site.

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

__construct()

Initialise the class.

protected __construct() : void
Tags
since
5.9.0
since
6.0.0

Add asset locations.

since
6.3.0

Use the Settings class.

uses
Settings
uses
Settings::get()

        
On this page

Search results