twentyeleven_header_style

Styles the header image and text displayed on the blog.

Description

twentyeleven_header_style(); 

Usage

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

Defined (1)

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

/functions.php  
  1. function twentyeleven_header_style() { 
  2.  
  3. // If no custom options for text are set, let's bail 
  4. // get_header_textcolor() options: HEADER_TEXTCOLOR is default, hide text (returns 'blank') or any hex value 
  5. if ( HEADER_TEXTCOLOR == get_header_textcolor() ) 
  6. return; 
  7. // If we get this far, we have custom styles. Let's do this. 
  8. ?> 
  9. <style type="text/css"> 
  10. <?php 
  11. // Has the text been hidden? 
  12. if ( 'blank' == get_header_textcolor() ) : 
  13. ?> 
  14. #site-title,  
  15. #site-description { 
  16. position: absolute !important; 
  17. clip: rect(1px 1px 1px 1px); /* IE6, IE7 */ 
  18. clip: rect(1px, 1px, 1px, 1px); 
  19. <?php 
  20. // If the user has set a custom color for the text use that 
  21. else : 
  22. ?> 
  23. #site-title a,  
  24. #site-description { 
  25. color: #<?php echo get_header_textcolor(); ?> !important; 
  26. <?php endif; ?> 
  27. </style> 
  28. <?php