Make WordPress Core


Ignore:
Timestamp:
08/02/2012 07:12:11 PM (14 years ago)
Author:
lancewillett
Message:

Twenty Twelve: CSS and markup improvements for better child theme support, part 3. See #21379.

  • Add classes like .site and .site-content in addition to the set of IDs already present, making things much better for child themes to have more than one generic element like nav inside the content container.
  • Bump JS version after selector change.
  • Move image-attachment to post_class() output

More exhaustive notes in the ticket on each id and class change.

File:
1 edited

Legend:

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

    r21261 r21404  
    1010get_header(); ?>
    1111
    12     <div id="primary" class="image-attachment">
     12    <div id="primary" class="site-content">
    1313        <div id="content" role="main">
    1414
    1515        <?php while ( have_posts() ) : the_post(); ?>
    1616
    17                 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
     17                <article id="post-<?php the_ID(); ?>" <?php post_class( 'image-attachment' ); ?>>
    1818                    <header class="entry-header">
    1919                        <h1 class="entry-title"><?php the_title(); ?></h1>
     
    3636                        </footer><!-- .entry-meta -->
    3737
    38                         <nav id="image-navigation" role="navigation">
     38                        <nav id="image-navigation" class="navigation" role="navigation">
    3939                            <span class="previous-image"><?php previous_image_link( false, __( '&larr; Previous', 'twentytwelve' ) ); ?></span>
    4040                            <span class="next-image"><?php next_image_link( false, __( 'Next &rarr;', 'twentytwelve' ) ); ?></span>
     
    9898
    9999        </div><!-- #content -->
    100     </div><!-- #primary -->
     100    </div><!-- #primary .site-content -->
    101101
    102102<?php get_footer(); ?>
Note: See TracChangeset for help on using the changeset viewer.