_custom_logo_header_styles

Adds CSS to hide header text for custom logo, based on Customizer setting.

Description

_custom_logo_header_styles(); 

Usage

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

Defined (1)

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

/wp-includes/theme.php  
  1. function _custom_logo_header_styles() { 
  2. if ( ! current_theme_supports( 'custom-header', 'header-text' ) && get_theme_support( 'custom-logo', 'header-text' ) && ! get_theme_mod( 'header_text', true ) ) { 
  3. $classes = (array) get_theme_support( 'custom-logo', 'header-text' ); 
  4. $classes = array_map( 'sanitize_html_class', $classes ); 
  5. $classes = '.' . implode( ', .', $classes ); 
  6.  
  7. ?> 
  8. <!-- Custom Logo: hide header text --> 
  9. <style id="custom-logo-css" type="text/css"> 
  10. <?php echo $classes; ?> { 
  11. position: absolute; 
  12. clip: rect(1px, 1px, 1px, 1px); 
  13. </style> 
  14. <?php