Action hook 'wp_print_styles'

in WP Core File wp-includes/functions.wp-styles.php at line 57

View Source

wp_print_styles

Action Hook
Description
Fires before styles in the $handles queue are printed.

Hook Information

File Location wp-includes/functions.wp-styles.php View on GitHub
Hook Type Action
Line Number 57

Hook Parameters

This hook doesn't accept any parameters.

Usage Examples

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

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

Source Code Context

wp-includes/functions.wp-styles.php:57 - How this hook is used in WordPress core
<?php
  52  		/**
  53  		 * Fires before styles in the $handles queue are printed.
  54  		 *
  55  		 * @since 2.6.0
  56  		 */
  57  		do_action( 'wp_print_styles' );
  58  	}
  59  
  60  	_wp_scripts_maybe_doing_it_wrong( __FUNCTION__ );
  61  
  62  	if ( ! ( $wp_styles instanceof WP_Styles ) ) {

PHP Documentation

<?php
/**
		 * Fires before styles in the $handles queue are printed.
		 *
		 * @since 2.6.0
		 */
Quick Info
  • Hook Type: Action
  • Parameters: 0
  • File: wp-includes/functions.wp-styles.php
Related Hooks

Related hooks will be displayed here in future updates.