twentythirteen_admin_header_style

Style the header image displayed on the Appearance > Header admin panel.

Description

twentythirteen_admin_header_style(); 

Usage

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

Defined (1)

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

/inc/custom-header.php  
  1. function twentythirteen_admin_header_style() { 
  2. $header_image = get_header_image(); 
  3. ?> 
  4. <style type="text/css" id="twentythirteen-admin-header-css"> 
  5. .appearance_page_custom-header #headimg { 
  6. border: none; 
  7. -webkit-box-sizing: border-box; 
  8. -moz-box-sizing: border-box; 
  9. box-sizing: border-box; 
  10. <?php 
  11. if ( ! empty( $header_image ) ) { 
  12. echo 'background: url(' . esc_url( $header_image ) . ') no-repeat scroll top; background-size: 1600px auto;'; 
  13. } ?> 
  14. padding: 0 20px; 
  15. #headimg .home-link { 
  16. -webkit-box-sizing: border-box; 
  17. -moz-box-sizing: border-box; 
  18. box-sizing: border-box; 
  19. margin: 0 auto; 
  20. max-width: 1040px; 
  21. <?php 
  22. if ( ! empty( $header_image ) || display_header_text() ) { 
  23. echo 'min-height: 230px;'; 
  24. } ?> 
  25. width: 100%; 
  26. <?php if ( ! display_header_text() ) : ?> 
  27. #headimg h1,  
  28. #headimg h2 { 
  29. position: absolute !important; 
  30. clip: rect(1px 1px 1px 1px); /* IE7 */ 
  31. clip: rect(1px, 1px, 1px, 1px); 
  32. <?php endif; ?> 
  33. #headimg h1 { 
  34. font: bold 60px/1 Bitter, Georgia, serif; 
  35. margin: 0; 
  36. padding: 58px 0 10px; 
  37. #headimg h1 a { 
  38. text-decoration: none; 
  39. #headimg h1 a:hover { 
  40. text-decoration: underline; 
  41. #headimg h2 { 
  42. font: 200 italic 24px "Source Sans Pro", Helvetica, sans-serif; 
  43. margin: 0; 
  44. text-shadow: none; 
  45. .default-header img { 
  46. max-width: 230px; 
  47. width: auto; 
  48. </style> 
  49. <?php