wp/wp-content/themes/twentytwelve/inc/custom-header.php
changeset 7 cf61fcea0001
parent 5 5e2f62d02dcd
--- a/wp/wp-content/themes/twentytwelve/inc/custom-header.php	Tue Jun 09 11:14:17 2015 +0000
+++ b/wp/wp-content/themes/twentytwelve/inc/custom-header.php	Mon Oct 14 17:39:30 2019 +0200
@@ -13,7 +13,7 @@
  * Set up the WordPress core custom header arguments and settings.
  *
  * @uses add_theme_support() to register support for 3.4 and up.
- * @uses twentytwelve_header_style() to style front-end.
+ * @uses twentytwelve_header_style() to style front end.
  * @uses twentytwelve_admin_header_style() to style wp-admin form.
  * @uses twentytwelve_admin_header_image() to add custom markup to wp-admin form.
  *
@@ -54,8 +54,9 @@
  */
 function twentytwelve_custom_header_fonts() {
 	$font_url = twentytwelve_get_font_url();
-	if ( ! empty( $font_url ) )
+	if ( ! empty( $font_url ) ) {
 		wp_enqueue_style( 'twentytwelve-fonts', esc_url_raw( $font_url ), array(), null );
+	}
 }
 add_action( 'admin_print_styles-appearance_page_custom-header', 'twentytwelve_custom_header_fonts' );
 
@@ -70,24 +71,25 @@
 	$text_color = get_header_textcolor();
 
 	// If no custom options for text are set, let's bail
-	if ( $text_color == get_theme_support( 'custom-header', 'default-text-color' ) )
+	if ( $text_color == get_theme_support( 'custom-header', 'default-text-color' ) ) {
 		return;
+	}
 
 	// If we get this far, we have custom styles.
 	?>
 	<style type="text/css" id="twentytwelve-header-css">
 	<?php
 		// Has the text been hidden?
-		if ( ! display_header_text() ) :
+	if ( ! display_header_text() ) :
 	?>
-		.site-title,
-		.site-description {
-			position: absolute;
-			clip: rect(1px 1px 1px 1px); /* IE7 */
-			clip: rect(1px, 1px, 1px, 1px);
-		}
+	.site-title,
+	.site-description {
+		position: absolute;
+		clip: rect(1px 1px 1px 1px); /* IE7 */
+		clip: rect(1px, 1px, 1px, 1px);
+	}
 	<?php
-		// If the user has set a custom color for the text, use that.
+	// If the user has set a custom color for the text, use that.
 		else :
 	?>
 		.site-header h1 a,
@@ -155,9 +157,12 @@
 	<div id="headimg">
 		<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 ) ) : ?>
+		<?php
+		$header_image = get_header_image();
+		if ( ! empty( $header_image ) ) :
+		?>
 			<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 }
+<?php
+}