]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-content/themes/twentythirteen/inc/custom-header.php
WordPress 4.2
[autoinstalls/wordpress.git] / wp-content / themes / twentythirteen / inc / custom-header.php
index 58b6c559d3b70857e566294571382058ce5dac2c..6a9a6adc5eb7f4e381bf9a4f281816fc48f6785b 100644 (file)
@@ -2,7 +2,7 @@
 /**
  * Implement a custom header for Twenty Thirteen
  *
- * @link http://codex.wordpress.org/Custom_Headers
+ * @link https://codex.wordpress.org/Custom_Headers
  *
  * @package WordPress
  * @subpackage Twenty_Thirteen
@@ -216,12 +216,15 @@ function twentythirteen_admin_header_style() {
  * @since Twenty Thirteen 1.0
  */
 function twentythirteen_admin_header_image() {
+       $style = 'color: #' . get_header_textcolor() . ';';
+       if ( ! display_header_text() ) {
+               $style = 'display: none;';
+       }
        ?>
-       <div id="headimg" style="background: url(<?php header_image(); ?>) no-repeat scroll top; background-size: 1600px auto;">
-               <?php $style = ' style="color:#' . get_header_textcolor() . ';"'; ?>
+       <div id="headimg" style="background: url(<?php echo esc_url( get_header_image() ); ?>) no-repeat scroll top; background-size: 1600px auto;">
                <div class="home-link">
-                       <h1 class="displaying-header-text"><a id="name"<?php echo $style; ?> onclick="return false;" href="#"><?php bloginfo( 'name' ); ?></a></h1>
-                       <h2 id="desc" class="displaying-header-text"<?php echo $style; ?>><?php bloginfo( 'description' ); ?></h2>
+                       <h1 class="displaying-header-text"><a id="name" style="<?php echo esc_attr( $style ); ?>" onclick="return false;" href="#" tabindex="-1"><?php bloginfo( 'name' ); ?></a></h1>
+                       <h2 id="desc" class="displaying-header-text" style="<?php echo esc_attr( $style ); ?>"><?php bloginfo( 'description' ); ?></h2>
                </div>
        </div>
 <?php }