_print_styles

Print styles (internal use only).

Description

_print_styles(); 

Usage

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

Defined (1)

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

/wp-includes/script-loader.php  
  1. function _print_styles() { 
  2. global $compress_css; 
  3.  
  4. $wp_styles =wp_styles); 
  5.  
  6. $zip = $compress_css ? 1 : 0; 
  7. if ( $zip && defined('ENFORCE_GZIP') && ENFORCE_GZIP ) 
  8. $zip = 'gzip'; 
  9.  
  10. if ( $concat = trim( $wp_styles->concat, ', ' ) ) { 
  11. $dir = $wp_styles->text_direction; 
  12. $ver = $wp_styles->default_version; 
  13.  
  14. $concat = str_split( $concat, 128 ); 
  15. $concat = 'load%5B%5D=' . implode( '&load%5B%5D=', $concat ); 
  16.  
  17. $href = $wp_styles->base_url . "/wp-admin/load-styles.php?c={$zip}&dir={$dir}&" . $concat . '&ver=' . $ver; 
  18. echo "<link rel='stylesheet' href='" . esc_attr($href) . "' type='text/css' media='all' />\n"; 
  19.  
  20. if ( !empty($wp_styles->print_code) ) { 
  21. echo "<style type='text/css'>\n"; 
  22. echo $wp_styles->print_code; 
  23. echo "\n</style>\n"; 
  24.  
  25. if ( !empty($wp_styles->print_html) ) 
  26. echo $wp_styles->print_html;