Make WordPress Core

Changeset 23820


Ignore:
Timestamp:
03/27/2013 06:51:47 PM (12 years ago)
Author:
lancewillett
Message:

Twenty Thirteen: take full advantage of new structured post format template functions, see r23819.

Extract first video or image from Video and Image post format posts, and place the item above the title within its own HTML wrapper with the_video() and the_image()'. Also, remove the item from the post content with the_extra_content()`.

This allows us to meet the design requirements for Twenty Thirteen with minimal changes to the theme template files. Fixes #23620.

Location:
trunk/wp-content/themes/twentythirteen
Files:
3 edited

Legend:

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

    r23680 r23820  
    1111<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    1212    <header class="entry-header">
     13        <div class="entry-media">
     14            <?php the_image(); ?>
     15        </div>
     16
    1317        <?php if ( is_single() ) : ?>
    1418        <h1 class="entry-title"><?php the_title(); ?></h1>
     
    2125
    2226    <div class="entry-content">
    23         <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentythirteen' ) ); ?>
     27        <?php the_extra_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentythirteen' ) ); ?>
    2428        <?php wp_link_pages( array( 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) ); ?>
    2529    </div><!-- .entry-content -->
  • trunk/wp-content/themes/twentythirteen/content-video.php

    r23680 r23820  
    1111<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    1212    <header class="entry-header">
     13        <div class="entry-media">
     14            <?php the_video(); ?>
     15        </div>
     16
    1317        <?php if ( is_single() ) : ?>
    1418        <h1 class="entry-title"><?php the_title(); ?></h1>
     
    2125
    2226    <div class="entry-content">
    23         <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentythirteen' ) ); ?>
     27        <?php the_extra_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentythirteen' ) ); ?>
    2428        <?php wp_link_pages( array( 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) ); ?>
    2529    </div><!-- .entry-content -->
  • trunk/wp-content/themes/twentythirteen/style.css

    r23817 r23820  
    16601660}
    16611661
     1662.format-image .entry-header {
     1663    max-width: 724px;
     1664}
     1665
     1666.format-image .entry-header img {
     1667    height: auto;
     1668    max-width: 724px;
     1669}
     1670
    16621671.format-image .entry-content .size-full {
    16631672    margin: 0 -60px;
     
    18721881    font-size: 50px;
    18731882    font-weight: 400;
     1883}
     1884
     1885.format-video .entry-header {
     1886    max-width: 724px;
    18741887}
    18751888
Note: See TracChangeset for help on using the changeset viewer.