Make WordPress Core


Ignore:
Timestamp:
02/14/2012 03:54:46 AM (13 years ago)
Author:
lancewillett
Message:

Twenty Twelve template changes and fixes ... see #19978.

  • Add custom header support
  • header.php: use get_stylesheet_uri() to load stylesheet, props Mamaduka
  • Add full-width template, including adding relevant body_class value as a CSS hook
  • Hide sidebar on all views if no active widgets exist
  • Fix site title output (was missing site title)
  • Remove "featured" title for sticky posts
  • Add content template files for aside, image, link, and quote post formats
  • Indent content-single.php to match content.php
  • Remove sample JPG since Twenty Twelve ships with no default header images

... and style updates, props drewstrojny

  • Better footer styles
  • Styling for full-width layouts
  • Add basic styles for archive views
  • Refine post header/footer styles a bit
File:
1 edited

Legend:

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

    r19842 r19915  
    11<?php
    22/**
    3  * The default template for displaying content
     3 * The default template for displaying content on indexed pages (home, archive, search)
    44 *
    55 * @package WordPress
     
    1111    <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    1212        <header class="entry-header">
    13             <?php if ( is_sticky() ) : ?>
    14                 <hgroup>
    15                     <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentytwelve' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
    16                     <h3 class="entry-format"><?php _e( 'Featured', 'twentytwelve' ); ?></h3>
    17                 </hgroup>
    18             <?php else : ?>
    1913            <h1 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentytwelve' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
    20             <?php endif; ?>
    2114
    22             <?php if ( 'post' == get_post_type() ) : ?>
     15            <?php if ( 'post' == get_post_type() ) : // Hide entry meta for pages ?>
    2316            <div class="entry-meta">
    2417                <?php twentytwelve_posted_on(); ?>
     
    2720        </header><!-- .entry-header -->
    2821
    29         <?php if ( is_search() ) : // Only display Excerpts for Search ?>
     22        <?php if ( is_search() ) : // Only display excerpts for search ?>
    3023        <div class="entry-summary">
    3124            <?php the_excerpt(); ?>
     
    3932
    4033        <footer class="entry-meta">
    41             <?php $show_sep = false; ?>
    42             <?php if ( 'post' == get_post_type() ) : // Hide category and tag text for pages on Search ?>
     34            <?php if ( 'post' == get_post_type() ) : // Hide category and tag text for pages ?>
    4335            <?php
    4436                /* translators: used between list items, there is a space after the comma */
    4537                $categories_list = get_the_category_list( __( ', ', 'twentytwelve' ) );
    46                 if ( $categories_list ):
     38                if ( $categories_list ) :
    4739            ?>
    4840            <span class="cat-links">
    49                 <?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentytwelve' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list );
    50                 $show_sep = true; ?>
     41                <?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentytwelve' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list ); ?>
    5142            </span>
    5243            <?php endif; // End if categories ?>
     
    5445                /* translators: used between list items, there is a space after the comma */
    5546                $tags_list = get_the_tag_list( '', __( ', ', 'twentytwelve' ) );
    56                 if ( $tags_list ):
    57                 if ( $show_sep ) : ?>
    58             <span class="sep"> | </span>
    59                 <?php endif; // End if $show_sep ?>
     47                if ( $tags_list ) : ?>
    6048            <span class="tag-links">
    61                 <?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentytwelve' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list );
    62                 $show_sep = true; ?>
     49                <?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentytwelve' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?>
    6350            </span>
    6451            <?php endif; // End if $tags_list ?>
     
    6653
    6754            <?php if ( comments_open() ) : ?>
    68             <?php if ( $show_sep ) : ?>
    69             <span class="sep"> | </span>
    70             <?php endif; // End if $show_sep ?>
    7155            <span class="comments-link"><?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentytwelve' ) . '</span>', __( '<b>1</b> Reply', 'twentytwelve' ), __( '<b>%</b> Replies', 'twentytwelve' ) ); ?></span>
    7256            <?php endif; // End if comments_open() ?>
Note: See TracChangeset for help on using the changeset viewer.