\Barn2\Plugin\WC_Default_Quantity\UtilsAssets

Handles the loading of scripts and stylesheets.

Summary

Methods
Properties
Constants
enqueue_script()
enqueue_style()
enqueue_asset()
locate_asset()
No public properties found
ASSETS_FOLDER
ASSETS_PREFIX
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Constants

ASSETS_FOLDER

ASSETS_FOLDER

ASSETS_PREFIX

ASSETS_PREFIX

Methods

enqueue_script()

enqueue_script(string  $name,string  $path,array  $dependencies = array())

Wrapper for wp_enqueue_script.

Parameters

string $name

name of asset

string $path

path to asset relative to the assets folder

array $dependencies

enqueue_style()

enqueue_style(string  $name,string  $path,array  $dependencies = array())

Wrapper for wp_enqueue_style.

Parameters

string $name

name of asset

string $path

path to asset relative to the assets folder

array $dependencies

enqueue_asset()

enqueue_asset(string  $type,string  $name,string  $path,array  $dependencies = array())

Enqueue script or style

Parameters

string $type
string $name
string $path
array $dependencies

locate_asset()

locate_asset(string  $path): boolean|string

Build path to asset.

Parameters

string $path

Returns

boolean|string