twentyfourteen_header_style

Styles the header image and text displayed on the blog.

Description

twentyfourteen_header_style(); 

Usage

  1. if ( !function_exists( 'twentyfourteen_header_style' ) ) { 
  2. require_once '/inc/custom-header.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = twentyfourteen_header_style(); 
  7.  

Defined (1)

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

/inc/custom-header.php  
  1. function twentyfourteen_header_style() { 
  2. $text_color = get_header_textcolor(); 
  3.  
  4. // If no custom color for text is set, let's bail. 
  5. if ( display_header_text() && $text_color === get_theme_support( 'custom-header', 'default-text-color' ) ) 
  6. return; 
  7.  
  8. // If we get this far, we have custom styles. 
  9. ?> 
  10. <style type="text/css" id="twentyfourteen-header-css"> 
  11. <?php 
  12. // Has the text been hidden? 
  13. if ( ! display_header_text() ) : 
  14. ?> 
  15. .site-title,  
  16. .site-description { 
  17. clip: rect(1px 1px 1px 1px); /* IE7 */ 
  18. clip: rect(1px, 1px, 1px, 1px); 
  19. position: absolute; 
  20. <?php 
  21. // If the user has set a custom color for the text, use that. 
  22. elseif ( $text_color != get_theme_support( 'custom-header', 'default-text-color' ) ) : 
  23. ?> 
  24. .site-title a { 
  25. color: #<?php echo esc_attr( $text_color ); ?>; 
  26. <?php endif; ?> 
  27. </style> 
  28. <?php