Fires when the WP_Scripts instance is initialized.
Parameters
$wp_scripts
WP_Scripts- WP_Scripts instance (passed by reference).
Source
do_action_ref_array( 'wp_default_scripts', array( &$this ) );
Changelog
Version | Description |
---|---|
2.6.0 | Introduced. |
Fires when the WP_Scripts instance is initialized.
$wp_scripts
WP_Scriptsdo_action_ref_array( 'wp_default_scripts', array( &$this ) );
Version | Description |
---|---|
2.6.0 | Introduced. |
You must log in before being able to contribute a note or feedback.
Add a script where you can refer to from anywhere in your WordPress installation using
wp_enqueue_script
oradmin_enqueue_script
.First setup the hook, for example in your plugin.
Now you can use the script from the plugin anywhere for example in your theme.
Please make sure that you pick an identical string for the “handle” argument, a good practice is prefixing the handle name with your plugin or theme name.