--- a/wp/wp-content/themes/twentytwelve/inc/custom-header.php Mon Jun 08 16:11:51 2015 +0000
+++ b/wp/wp-content/themes/twentytwelve/inc/custom-header.php Tue Jun 09 03:35:32 2015 +0200
@@ -2,7 +2,7 @@
/**
* Implement an optional custom header for Twenty Twelve
*
- * See http://codex.wordpress.org/Custom_Headers
+ * See https://codex.wordpress.org/Custom_Headers
*
* @package WordPress
* @subpackage Twenty_Twelve
@@ -51,8 +51,6 @@
* Load our special font CSS file.
*
* @since Twenty Twelve 1.2
- *
- * @return void
*/
function twentytwelve_custom_header_fonts() {
$font_url = twentytwelve_get_font_url();
@@ -149,19 +147,17 @@
* @since Twenty Twelve 1.0
*/
function twentytwelve_admin_header_image() {
+ $style = 'color: #' . get_header_textcolor() . ';';
+ if ( ! display_header_text() ) {
+ $style = 'display: none;';
+ }
?>
<div id="headimg">
- <?php
- if ( ! display_header_text() )
- $style = ' style="display:none;"';
- else
- $style = ' style="color:#' . get_header_textcolor() . ';"';
- ?>
- <h1 class="displaying-header-text"><a id="name"<?php echo $style; ?> onclick="return false;" href="<?php echo esc_url( home_url( '/' ) ); ?>"><?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="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a></h1>
+ <h2 id="desc" class="displaying-header-text" style="<?php echo esc_attr( $style ); ?>"><?php bloginfo( 'description' ); ?></h2>
<?php $header_image = get_header_image();
if ( ! empty( $header_image ) ) : ?>
- <img src="<?php echo esc_url( $header_image ); ?>" class="header-image" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="" />
+ <img src="<?php echo esc_url( $header_image ); ?>" class="header-image" width="<?php echo esc_attr( get_custom_header()->width ); ?>" height="<?php echo esc_attr( get_custom_header()->height ); ?>" alt="" />
<?php endif; ?>
</div>
-<?php }
\ No newline at end of file
+<?php }