wp_print_scripts

wp_print_scripts

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.5.2

do_action('wp_print_scripts') is found 3 times:

  • /wp-includes/functions.wp-scripts.php line 95
    	 * Fires before scripts in the $handles queue are printed.
    	 *
    	 * @since 2.1.0
    	 */
    	do_action( 'wp_print_scripts' );
    
    	if ( '' === $handles ) { // For 'wp_head'.
    		$handles = false;
    	}
    
    	_wp_scripts_maybe_doing_it_wrong( __FUNCTION__ );
    
  • /wp-includes/script-loader.php line 2097
    	global $concatenate_scripts;
    
    	if ( ! did_action( 'wp_print_scripts' ) ) {
    		/** This action is documented in wp-includes/functions.wp-scripts.php */
    		do_action( 'wp_print_scripts' );
    	}
    
    	$wp_scripts = wp_scripts();
    
    	script_concat_settings();
    	$wp_scripts->do_concat = $concatenate_scripts;
    
  • /wp-includes/script-loader.php line 2217
    	global $wp_scripts;
    
    	if ( ! did_action( 'wp_print_scripts' ) ) {
    		/** This action is documented in wp-includes/functions.wp-scripts.php */
    		do_action( 'wp_print_scripts' );
    	}
    
    	if ( ! ( $wp_scripts instanceof WP_Scripts ) ) {
    		return array(); // No need to run if nothing is queued.
    	}
    
    

See this hook used in plugins: