moxie-lean / assets
Loader for theme assets and some extra utilities related with loader of the assets.
Installs: 32 985
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 16
Forks: 0
Open Issues: 0
Requires
- php: >=7.4 || >=8.0
Requires (Dev)
This package is auto-updated.
Last update: 2024-11-16 21:09:12 UTC
README
Usage
$assets = new \Lean\Assets( $args ); $assets->load();
Where $args
is an array with a group of options you can use to customize your asset loading the
options available are:
css_uri
Path to the CSS being loaded.css_version
- Defaultfalse
, version to specify at the end of the css loaded, useful to prevent the cache of the browser on the styles.js_version
- Defaultfalse
, version to specify at the end of the JS loaded, useful to preventjs_uri
- Deafault''
empty string, path where the JS is located.js_version
- Defaultfalse
, version to specify at the end of the JS loaded, useful to prevent cache of script by the browser.jquery_uri
- Default''
empty string, useful to change the default path to jQuery by a Google CDN URL instead.jquery_version
- Defaultfalse
if you specify a version number is used to specify the number of jQuery to load.automatic_suffix
- Defaultfalse
This flags allows you to disable the option to add automatically the.min
suffix to each asset loaded when theproduction
mode is enabled.automatic_suffix
- Default 10 - Sets the loading priority of the assets by accessing the priority of the action hookwp_enqueue_scripts
.