Frontend_Scripts implements Service, Registerable, Conditional
Handles the registering of the front-end scripts and stylesheets. Also creates the inline CSS (if required) for the product tables.
Tags
Interfaces, Classes and Traits
- Service
- Registerable
- Conditional
Table of Contents
- DATATABLES_VERSION = '1.13.5'
- SCRIPT_HANDLE = 'wc-product-table'
- $script_version : mixed
- __construct() : mixed
- Constructor.
- is_required() : mixed
- load_head_scripts() : mixed
- load_photoswipe_template() : mixed
- load_scripts() : mixed
- load_table_scripts() : mixed
- Register the scripts & styles for an individual product table.
- register() : mixed
- register_scripts() : mixed
- register_styles() : mixed
- reregister_woocommerce_scripts() : void
- Some themes take it upon themselves to remove core WC scripts & styles which we require, so re-register them here.
- build_custom_styles() : mixed
Constants
DATATABLES_VERSION
public
mixed
DATATABLES_VERSION
= '1.13.5'
SCRIPT_HANDLE
public
mixed
SCRIPT_HANDLE
= 'wc-product-table'
Properties
$script_version
private
mixed
$script_version
Methods
__construct()
Constructor.
public
__construct(string $script_version) : mixed
Parameters
- $script_version : string
-
The script version for registering product table assets.
Return values
mixed —is_required()
public
is_required() : mixed
Return values
mixed —load_head_scripts()
public
load_head_scripts() : mixed
Return values
mixed —load_photoswipe_template()
public
static load_photoswipe_template() : mixed
Return values
mixed —load_scripts()
public
load_scripts() : mixed
Return values
mixed —load_table_scripts()
Register the scripts & styles for an individual product table.
public
static load_table_scripts(Table_Args $args) : mixed
Parameters
- $args : Table_Args
Return values
mixed —register()
public
register() : mixed
Return values
mixed —register_scripts()
public
register_scripts() : mixed
Return values
mixed —register_styles()
public
register_styles() : mixed
Return values
mixed —reregister_woocommerce_scripts()
Some themes take it upon themselves to remove core WC scripts & styles which we require, so re-register them here.
public
reregister_woocommerce_scripts() : void
Return values
void —build_custom_styles()
private
static build_custom_styles(mixed $options) : mixed
Parameters
- $options : mixed