wp/wp-content/themes/twentyfourteen/inc/custom-header.php
changeset 7 cf61fcea0001
parent 5 5e2f62d02dcd
--- a/wp/wp-content/themes/twentyfourteen/inc/custom-header.php	Tue Jun 09 11:14:17 2015 +0000
+++ b/wp/wp-content/themes/twentyfourteen/inc/custom-header.php	Mon Oct 14 17:39:30 2019 +0200
@@ -35,36 +35,40 @@
 	 *                                          the Appearance > Header screen.
 	 * }
 	 */
-	add_theme_support( 'custom-header', apply_filters( 'twentyfourteen_custom_header_args', array(
-		'default-text-color'     => 'fff',
-		'width'                  => 1260,
-		'height'                 => 240,
-		'flex-height'            => true,
-		'wp-head-callback'       => 'twentyfourteen_header_style',
-		'admin-head-callback'    => 'twentyfourteen_admin_header_style',
-		'admin-preview-callback' => 'twentyfourteen_admin_header_image',
-	) ) );
+	add_theme_support(
+		'custom-header', apply_filters(
+			'twentyfourteen_custom_header_args', array(
+				'default-text-color'     => 'fff',
+				'width'                  => 1260,
+				'height'                 => 240,
+				'flex-height'            => true,
+				'wp-head-callback'       => 'twentyfourteen_header_style',
+				'admin-head-callback'    => 'twentyfourteen_admin_header_style',
+				'admin-preview-callback' => 'twentyfourteen_admin_header_image',
+			)
+		)
+	);
 }
 add_action( 'after_setup_theme', 'twentyfourteen_custom_header_setup' );
 
 if ( ! function_exists( 'twentyfourteen_header_style' ) ) :
-/**
- * Styles the header image and text displayed on the blog
- *
- * @see twentyfourteen_custom_header_setup().
- *
- */
-function twentyfourteen_header_style() {
-	$text_color = get_header_textcolor();
+	/**
+	 * Styles the header image and text displayed on the blog
+	 *
+	 * @see twentyfourteen_custom_header_setup().
+	 */
+	function twentyfourteen_header_style() {
+		$text_color = get_header_textcolor();
 
-	// If no custom color for text is set, let's bail.
-	if ( display_header_text() && $text_color === get_theme_support( 'custom-header', 'default-text-color' ) )
-		return;
+		// If no custom color for text is set, let's bail.
+		if ( display_header_text() && $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="twentyfourteen-header-css">
-	<?php
+		// If we get this far, we have custom styles.
+		?>
+		<style type="text/css" id="twentyfourteen-header-css">
+		<?php
 		// Has the text been hidden?
 		if ( ! display_header_text() ) :
 	?>
@@ -84,20 +88,20 @@
 	<?php endif; ?>
 	</style>
 	<?php
-}
+	}
 endif; // twentyfourteen_header_style
 
 
 if ( ! function_exists( 'twentyfourteen_admin_header_style' ) ) :
-/**
- * Style the header image displayed on the Appearance > Header screen.
- *
- * @see twentyfourteen_custom_header_setup()
- *
- * @since Twenty Fourteen 1.0
- */
-function twentyfourteen_admin_header_style() {
-?>
+	/**
+	 * Style the header image displayed on the Appearance > Header screen.
+	 *
+	 * @see twentyfourteen_custom_header_setup()
+	 *
+	 * @since Twenty Fourteen 1.0
+	 */
+	function twentyfourteen_admin_header_style() {
+	?>
 	<style type="text/css" id="twentyfourteen-admin-header-css">
 	.appearance_page_custom-header #headimg {
 		background-color: #000;
@@ -122,20 +126,20 @@
 		vertical-align: middle;
 	}
 	</style>
-<?php
-}
+	<?php
+	}
 endif; // twentyfourteen_admin_header_style
 
 if ( ! function_exists( 'twentyfourteen_admin_header_image' ) ) :
-/**
- * Create the custom header image markup displayed on the Appearance > Header screen.
- *
- * @see twentyfourteen_custom_header_setup()
- *
- * @since Twenty Fourteen 1.0
- */
-function twentyfourteen_admin_header_image() {
-?>
+	/**
+	 * Create the custom header image markup displayed on the Appearance > Header screen.
+	 *
+	 * @see twentyfourteen_custom_header_setup()
+	 *
+	 * @since Twenty Fourteen 1.0
+	 */
+	function twentyfourteen_admin_header_image() {
+	?>
 	<div id="headimg">
 		<?php if ( get_header_image() ) : ?>
 		<img src="<?php header_image(); ?>" alt="">
@@ -143,5 +147,5 @@
 		<h1 class="displaying-header-text"><a id="name" style="<?php echo esc_attr( sprintf( 'color: #%s;', get_header_textcolor() ) ); ?>" onclick="return false;" href="<?php echo esc_url( home_url( '/' ) ); ?>" tabindex="-1"><?php bloginfo( 'name' ); ?></a></h1>
 	</div>
 <?php
-}
+	}
 endif; // twentyfourteen_admin_header_image