Twenty Twelve: more fixes for escaping and minor code style issues. See #29127.
git-svn-id: https://develop.svn.wordpress.org/trunk@31262 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
74eb9552bf
commit
260f671a95
@ -46,7 +46,7 @@
|
|||||||
</nav><!-- #site-navigation -->
|
</nav><!-- #site-navigation -->
|
||||||
|
|
||||||
<?php if ( get_header_image() ) : ?>
|
<?php if ( get_header_image() ) : ?>
|
||||||
<a href="<?php echo esc_url( home_url( '/' ) ); ?>"><img src="<?php header_image(); ?>" class="header-image" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" /></a>
|
<a href="<?php echo esc_url( home_url( '/' ) ); ?>"><img src="<?php 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 echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" /></a>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</header><!-- #masthead -->
|
</header><!-- #masthead -->
|
||||||
|
|
||||||
|
@ -147,19 +147,17 @@ function twentytwelve_admin_header_style() {
|
|||||||
* @since Twenty Twelve 1.0
|
* @since Twenty Twelve 1.0
|
||||||
*/
|
*/
|
||||||
function twentytwelve_admin_header_image() {
|
function twentytwelve_admin_header_image() {
|
||||||
|
$style = 'color: #' . get_header_textcolor() . ';';
|
||||||
|
if ( ! display_header_text() ) {
|
||||||
|
$style = 'display: none;';
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
<div id="headimg">
|
<div id="headimg">
|
||||||
<?php
|
<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>
|
||||||
if ( ! display_header_text() )
|
<h2 id="desc" class="displaying-header-text" style="<?php echo esc_attr( $style ); ?>"><?php bloginfo( 'description' ); ?></h2>
|
||||||
$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( '/' ) ); ?>" tabindex="-1"><?php bloginfo( 'name' ); ?></a></h1>
|
|
||||||
<h2 id="desc" class="displaying-header-text"<?php echo $style; ?>><?php bloginfo( 'description' ); ?></h2>
|
|
||||||
<?php $header_image = get_header_image();
|
<?php $header_image = get_header_image();
|
||||||
if ( ! empty( $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; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
<?php }
|
<?php }
|
||||||
|
Loading…
Reference in New Issue
Block a user