Fieldmanager_Util_Assets
class Fieldmanager_Util_Assets (View source)
Asset management.
Properties
protected array | $scripts | Array of scripts to enqueue during *_enqueue_scripts |
|
protected array | $styles | Array of scripts to enqueue during *_enqueue_styles |
|
bool | $hooked | Ensure that the enqueue method only gets hooked once. |
Methods
Get the singleton instance.
Enqueue all assets during the correct action.
Enqueue or output a script.
Enqueue a script.
Enqueue or output a style.
Enqueue a style.
Hook into admin_enqueue_scripts and wp_enqueue_scripts if we haven't already.
Enqueue a script, optionally localizing data to it.
Register and enqueue a style.
Details
static Fieldmanager_Util_Assets
instance()
Get the singleton instance.
enqueue_assets()
Enqueue all assets during the correct action.
protected
pre_enqueue_script(array $args)
Enqueue or output a script.
Checks if the *_enqueue_scripts action has already fired and if so, outputs the script immediately. If not, the handle gets added to an array to enqueue later.
protected
enqueue_script(array $args)
Enqueue a script.
protected
pre_enqueue_style(array $args)
Enqueue or output a style.
Checks if the *_enqueue_scripts action has already fired and if so, outputs the style immediately. If not, the handle gets added to an array to enqueue later.
protected
enqueue_style(array $args)
Enqueue a style.
protected
hook_enqueue()
Hook into admin_enqueue_scripts and wp_enqueue_scripts if we haven't already.
add_script(array $args)
Enqueue a script, optionally localizing data to it.
add_style(array $args)
Register and enqueue a style.