print_styles_array

Filters the array of enqueued styles before processing for output.

Description

apply_filters( 'print_styles_array', (array) $this_to_do ); 

Parameters (1)

0. $this_to_do (array)
The list of enqueued styles about to be processed.

Usage

To run the hook, copy the example below.
  1. $this_to_do = apply_filters( 'print_styles_array', $this_to_do ); 
  2.  
  3. if ( !empty( $this_to_do ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the print_styles_array callback 
  2. function filter_print_styles_array( $this_to_do ) { 
  3. // make filter magic happen here... 
  4. return $this_to_do
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'print_styles_array', 'filter_print_styles_array', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'print_styles_array', 'filter_print_styles_array', 10, 1 ); 

Defined (1)

The filter is defined in the following location(s).

/wp-includes/class.wp-styles.php  
  1. $this->to_do = apply_filters( 'print_styles_array', $this->to_do );