Make WordPress Core


Ignore:
Timestamp:
05/10/2010 06:04:14 AM (15 years ago)
Author:
nbachiyski
Message:

I18n fixes for header.php in Twentyten. Props zeo. See #13198

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/themes/twentyten/header.php

    r14433 r14535  
    3636    <link rel="profile" href="http://gmpg.org/xfn/11" />
    3737    <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
    38     <?php if ( is_singular() && get_option('thread_comments') ) wp_enqueue_script( 'comment-reply' ); ?>
     38    <?php if ( is_singular() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); ?>
    3939    <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
    4040    <?php wp_head(); ?>
     
    4646        <div id="masthead">
    4747            <div id="branding">
    48                 <?php if ( is_home() || is_front_page() ) { ?>
    49                     <h1 id="site-title"><span><a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></span></h1>
    50                 <?php } else { ?>
    51                     <div id="site-title"><span><a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></span></div>
    52                 <?php } ?>
    53                
     48                <?php $heading_tag = ( is_home() || is_front_page() )? 'h1' : 'div'; ?>
     49                <<?php echo $heading_tag; ?> id="site-title">
     50                    <span>
     51                        <a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
     52                    </span>
     53                </<?php echo $heading_tag; ?>>             
    5454                <div id="site-description"><?php bloginfo( 'description' ); ?></div>
    5555
     
    5858                    if ( is_singular() &&
    5959                            has_post_thumbnail( $post->ID ) &&
    60                             ( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail') ) &&
     60                            ( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail' ) ) &&
    6161                            $image[1] >= HEADER_IMAGE_WIDTH ) :
    6262                        // Houston, we have a new header image!
Note: See TracChangeset for help on using the changeset viewer.