Action hook 'wp_enqueue_scripts'

in WP Core File wp-includes/script-loader.php at line 2299

View Source

wp_enqueue_scripts

Action Hook
Description
Fires when scripts and styles are enqueued.

Hook Information

File Location wp-includes/script-loader.php View on GitHub
Hook Type Action
Line Number 2299

Hook Parameters

This hook doesn't accept any parameters.

Usage Examples

Basic Usage
<?php
// Hook into wp_enqueue_scripts
add_action('wp_enqueue_scripts', 'my_custom_function');

function my_custom_function() {
    // Your custom code here
}

Source Code Context

wp-includes/script-loader.php:2299 - How this hook is used in WordPress core
<?php
2294  	/**
2295  	 * Fires when scripts and styles are enqueued.
2296  	 *
2297  	 * @since 2.8.0
2298  	 */
2299  	do_action( 'wp_enqueue_scripts' );
2300  }
2301  
2302  /**
2303   * Prints the styles queue in the HTML head on admin pages.
2304   *

PHP Documentation

<?php
/**
	 * Fires when scripts and styles are enqueued.
	 *
	 * @since 2.8.0
	 */
Quick Info
  • Hook Type: Action
  • Parameters: 0
  • File: wp-includes/script-loader.php
Related Hooks

Related hooks will be displayed here in future updates.