Changeset 25625 for trunk/src/wp-content/themes/twentyeleven/header.php
- Timestamp:
- 09/25/2013 04:49:36 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentyeleven/header.php
r23778 r25625 1 1 <?php 2 2 /** 3 * The Header for our theme.3 * Header template for the theme 4 4 * 5 * Displays all of the <head> section and everything up till <div id="main"> 5 * Displays all of the <head> section and everything up till <div id="main">. 6 6 * 7 7 * @package WordPress … … 26 26 <meta name="viewport" content="width=device-width" /> 27 27 <title><?php 28 /* 28 /** 29 29 * Print the <title> tag based on what is being viewed. 30 30 */ … … 53 53 <![endif]--> 54 54 <?php 55 /* We add some JavaScript to pages with the comment form 55 /** 56 * We add some JavaScript to pages with the comment form 56 57 * to support sites with threaded comments (when in use). 57 58 */ … … 59 60 wp_enqueue_script( 'comment-reply' ); 60 61 61 /* Always have wp_head() just before the closing </head> 62 /** 63 * Always have wp_head() just before the closing </head> 62 64 * tag of your theme, or you will break many plugins, which 63 65 * generally use this hook to add elements to <head> such … … 82 84 // Compatibility with versions of WordPress prior to 3.4. 83 85 if ( function_exists( 'get_custom_header' ) ) { 84 // We need to figure out what the minimum width should be for our featured image. 85 // This result would be the suggested width if the theme were to implement flexible widths. 86 /** 87 * We need to figure out what the minimum width should be for our featured image. 88 * This result would be the suggested width if the theme were to implement flexible widths. 89 */ 86 90 $header_image_width = get_theme_support( 'custom-header', 'width' ); 87 91 } else { … … 91 95 <a href="<?php echo esc_url( home_url( '/' ) ); ?>"> 92 96 <?php 93 // The header image 94 // Check if this is a post or page, if it has a thumbnail, and if it's a big one 97 /** 98 * The header image. 99 * Check if this is a post or page, if it has a thumbnail, and if it's a big one 100 */ 95 101 if ( is_singular() && has_post_thumbnail( $post->ID ) && 96 102 ( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), array( $header_image_width, $header_image_width ) ) ) &&
Note: See TracChangeset
for help on using the changeset viewer.