twentyeleven_admin_header_image

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

Description

twentyeleven_admin_header_image(); 

Referenced via add_theme_support('custom-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. $color = get_header_textcolor(); 
  5. $image = get_header_image(); 
  6. $style = 'display: none;'; 
  7. if ( $color && $color != 'blank' ) { 
  8. $style = 'color: #' . $color . ';'; 
  9. ?> 
  10. <h1 class="displaying-header-text"><a id="name" style="<?php echo esc_attr( $style ); ?>" onclick="return false;" href="<?php echo esc_url( home_url( '/' ) ); ?>" tabindex="-1"><?php bloginfo( 'name' ); ?></a></h1> 
  11. <div id="desc" class="displaying-header-text" style="<?php echo esc_attr( $style ); ?>"><?php bloginfo( 'description' ); ?></div> 
  12. <?php if ( $image ) : ?> 
  13. <img src="<?php echo esc_url( $image ); ?>" alt="" /> 
  14. <?php endif; ?> 
  15. </div> 
  16. <?php }