Changeset 42343 for trunk/src/wp-content/themes/twentyten/header.php
- Timestamp:
- 11/30/2017 11:09:33 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentyten/header.php
r42228 r42343 13 13 <head> 14 14 <meta charset="<?php bloginfo( 'charset' ); ?>" /> 15 <title><?php 15 <title> 16 <?php 16 17 /* 17 18 * Print the <title> tag based on what is being viewed. … … 26 27 // Add the blog description for the home/front page. 27 28 $site_description = get_bloginfo( 'description', 'display' ); 28 if ( $site_description && ( is_home() || is_front_page() ) ) 29 echo " | $site_description"; 29 if ( $site_description && ( is_home() || is_front_page() ) ) { 30 echo " | $site_description"; 31 } 30 32 31 33 // Add a page number if necessary: 32 if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) 33 echo esc_html( ' | ' . sprintf( __( 'Page %s', 'twentyten' ), max( $paged, $page ) ) ); 34 if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) { 35 echo esc_html( ' | ' . sprintf( __( 'Page %s', 'twentyten' ), max( $paged, $page ) ) ); 36 } 34 37 35 ?></title> 38 ?> 39 </title> 36 40 <link rel="profile" href="http://gmpg.org/xfn/11" /> 37 41 <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" /> … … 42 46 * to support sites with threaded comments (when in use). 43 47 */ 44 if ( is_singular() && get_option( 'thread_comments' ) ) 45 wp_enqueue_script( 'comment-reply' ); 48 if ( is_singular() && get_option( 'thread_comments' ) ) { 49 wp_enqueue_script( 'comment-reply' ); 50 } 46 51 47 52 /* … … 70 75 <?php 71 76 // Compatibility with versions of WordPress prior to 3.4. 72 73 74 75 76 77 78 79 80 77 if ( function_exists( 'get_custom_header' ) ) { 78 /* 79 * We need to figure out what the minimum width should be for our featured image. 80 * This result would be the suggested width if the theme were to implement flexible widths. 81 */ 82 $header_image_width = get_theme_support( 'custom-header', 'width' ); 83 } else { 84 $header_image_width = HEADER_IMAGE_WIDTH; 85 } 81 86 82 87 // Check if this is a post or page, if it has a thumbnail, and if it's a big one 83 88 if ( is_singular() && current_theme_supports( 'post-thumbnails' ) && 84 89 has_post_thumbnail( $post->ID ) && 85 90 ( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail' ) ) && 86 91 $image[1] >= $header_image_width ) : 87 88 92 // Houston, we have a new header image! 93 echo get_the_post_thumbnail( $post->ID ); 89 94 elseif ( get_header_image() ) : 90 95 // Compatibility with versions of WordPress prior to 3.4. … … 105 110 <div class="skip-link screen-reader-text"><a href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentyten' ); ?>"><?php _e( 'Skip to content', 'twentyten' ); ?></a></div> 106 111 <?php /* Our navigation menu. If one isn't filled out, wp_nav_menu falls back to wp_page_menu. The menu assiged to the primary position is the one used. If none is assigned, the menu with the lowest ID is used. */ ?> 107 <?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?> 112 <?php 113 wp_nav_menu( 114 array( 115 'container_class' => 'menu-header', 116 'theme_location' => 'primary', 117 ) 118 ); 119 ?> 108 120 </div><!-- #access --> 109 121 </div><!-- #masthead -->
Note: See TracChangeset
for help on using the changeset viewer.