Frontend_Scripts implements Service, Registerable, Conditional
Loads the various scripts and styles needed for the express shop page.
Tags
Interfaces, Classes and Traits
- Service
- Registerable
- Conditional
Table of Contents
- SCRIPT_HANDLE = 'wc-express-page'
- $rest_server : mixed
- $settings : mixed
- $version : mixed
- __construct() : mixed
- Constructor - set up the plugin version and settings
- is_required() : bool
- Check if it's required to load the service on certain requests
- load_scripts() : mixed
- Load plugin related scripts
- register() : mixed
- Register necessary hooks
- register_scripts() : mixed
- Register scripts and styles with WordPress
- enqueue_scripts() : mixed
- Enqueue the plugin related scripts
- enqueue_styles() : mixed
- Enqueue the plugin related styles
- should_load_scripts() : mixed
- Check should the scripts enqueue on the page
Constants
SCRIPT_HANDLE
public
mixed
SCRIPT_HANDLE
= 'wc-express-page'
Properties
$rest_server
private
mixed
$rest_server
$settings
private
mixed
$settings
$version
private
mixed
$version
Methods
__construct()
Constructor - set up the plugin version and settings
public
__construct(string $version) : mixed
Parameters
- $version : string
-
The plugin version
Return values
mixed —is_required()
Check if it's required to load the service on certain requests
public
is_required() : bool
Return values
bool —load_scripts()
Load plugin related scripts
public
load_scripts() : mixed
Return values
mixed —register()
Register necessary hooks
public
register() : mixed
Return values
mixed —register_scripts()
Register scripts and styles with WordPress
public
register_scripts() : mixed
Return values
mixed —enqueue_scripts()
Enqueue the plugin related scripts
private
enqueue_scripts() : mixed
Return values
mixed —enqueue_styles()
Enqueue the plugin related styles
private
enqueue_styles() : mixed
Return values
mixed —should_load_scripts()
Check should the scripts enqueue on the page
private
should_load_scripts() : mixed