print_late_styles

Prints the styles that were queued too late for the HTML head.

Description

(array|void) print_late_styles(); 

Returns (array|void)


Usage

  1. if ( !function_exists( 'print_late_styles' ) ) { 
  2. require_once ABSPATH . WPINC . '/script-loader.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = print_late_styles(); 
  7.  

Defined (1)

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

/wp-includes/script-loader.php  
  1. function print_late_styles() { 
  2. global $wp_styles, $concatenate_scripts; 
  3.  
  4. if ( ! ( $wp_styles instanceof WP_Styles ) ) { 
  5. return; 
  6.  
  7. $wp_styles->do_concat = $concatenate_scripts; 
  8. $wp_styles->do_footer_items(); 
  9.  
  10. /** 
  11. * Filters whether to print the styles queued too late for the HTML head. 
  12. * @since 3.3.0 
  13. * @param bool $print Whether to print the 'late' styles. Default true. 
  14. */ 
  15. if ( apply_filters( 'print_late_styles', true ) ) { 
  16.  
  17. $wp_styles->reset(); 
  18. return $wp_styles->done;