twentyeleven_admin_header_image

Custom header image markup displayed on the Appearance > Header admin panel.

Description

twentyeleven_admin_header_image(); 

Referenced via add_custom_image_header() in twentyeleven_setup().


Usage

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

Defined (1)

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

/functions.php  
  1. function twentyeleven_admin_header_image() { ?> 
  2. <div id="headimg"> 
  3. <?php 
  4. if ( 'blank' == get_theme_mod( 'header_textcolor', HEADER_TEXTCOLOR ) || '' == get_theme_mod( 'header_textcolor', HEADER_TEXTCOLOR ) ) 
  5. $style = ' style="display:none;"'; 
  6. else 
  7. $style = ' style="color:#' . get_theme_mod( 'header_textcolor', HEADER_TEXTCOLOR ) . ';"'; 
  8. ?> 
  9. <h1><a id="name"<?php echo $style; ?> onclick="return false;" href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a></h1> 
  10. <div id="desc"<?php echo $style; ?>><?php bloginfo( 'description' ); ?></div> 
  11. <?php $header_image = get_header_image(); 
  12. if ( ! empty( $header_image ) ) : ?> 
  13. <img src="<?php echo esc_url( $header_image ); ?>" alt="" /> 
  14. <?php endif; ?> 
  15. </div> 
  16. <?php }