wp_scripts() – Function | Developer.WordPress.org
Initializes $wp_scripts if it has not been set.
Return
WP_Scripts WP_Scripts instance.Source
function wp_scripts() {
global $wp_scripts;
if ( ! ( $wp_scripts instanceof WP_Scripts ) ) {
$wp_scripts = new WP_Scripts();
}
return $wp_scripts;
}
| Uses | Description |
|---|---|
WP_Scripts::__construct()wp-includes/class-wp-scripts.php | Constructor. |
| Used by | Description |
|---|---|
WP_Block::render()wp-includes/class-wp-block.php | Generates the render output for the block. |
_WP_Editors::force_uncompressed_tinymce()wp-includes/class-wp-editor.php | Force uncompressed TinyMCE when a custom theme has been defined. |
load_script_textdomain()wp-includes/l10n.php | Loads the script translated strings. |
wp_add_inline_script()wp-includes/functions.wp-scripts.php | Adds extra code to a registered script. |
WP_Customize_Nav_Menus::enqueue_scripts()wp-includes/class-wp-customize-nav-menus.php | Enqueues scripts and styles for Customizer pane. |
wp_script_add_data()wp-includes/functions.wp-scripts.php | Adds metadata to a script. |
_wp_customize_loader_settings()wp-includes/theme.php | Adds settings for the customize-loader script. |
wp_print_scripts()wp-includes/functions.wp-scripts.php | Prints scripts in document head that are in the $handles queue. |
wp_register_script()wp-includes/functions.wp-scripts.php | Registers a new script. |
wp_localize_script()wp-includes/functions.wp-scripts.php | Localizes a script. |
wp_deregister_script()wp-includes/functions.wp-scripts.php | Removes a registered script. |
wp_enqueue_script()wp-includes/functions.wp-scripts.php | Enqueues a script. |
wp_dequeue_script()wp-includes/functions.wp-scripts.php | Removes a previously enqueued script. |
wp_script_is()wp-includes/functions.wp-scripts.php | Determines whether a script has been added to the queue. |
wp_plupload_default_settings()wp-includes/media.php | Prints default Plupload arguments. |
print_head_scripts()wp-includes/script-loader.php | Prints the script queue in the HTML head on admin pages. |
Changelog
| Version | Description |
|---|---|
| 4.2.0 | Introduced. |