Manages the assets loading for a feature.
WARNING: this method doesn't register the asset: You have to take care of it by yourself (tipically in assets.php)
author | etessore |
---|---|
version | 1.0.1 |
package | classes |
deprecated | uses ThemeHelpers::load_css() and ThemeHelpers::load_js() instead |
add_asset(string $handle, string $type) : \FeatureWithAssets
You cannot define an asset here, to do it please use wp_register_script or wp_register_style in functions.php or config/assets.php WARNING: this method doesn't register the asset: You have to take care of it by yourself (tipically in assets.php)
string
the handle for the asset.
string
the asset type: js|css
\FeatureWithAssets
$this for chainabilityload_assets() : \FeatureWithAssets
\FeatureWithAssets
$this for chainabilityload_assets_callback() : \FeatureWithAssets
\FeatureWithAssets
$this for chainabilityset_assets(array $assets) : \FeatureWithAssets
array
the list of assets: array('js'=>array(...), 'css'=>array(...));
\FeatureWithAssets
$this for chainability$assets : array