<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[25090] trunk/src/wp-content/themes/twentyfourteen: Twenty Fourteen: widgetize the Post Format front page so other widgets can be used there, and the special Post Format content can be used in other widget areas.</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://core.trac.wordpress.org/changeset/25090">25090</a></dd>
<dt>Author</dt> <dd>lancewillett</dd>
<dt>Date</dt> <dd>2013-08-22 18:05:56 +0000 (Thu, 22 Aug 2013)</dd>
</dl>

<h3>Log Message</h3>
<pre>Twenty Fourteen: widgetize the Post Format front page so other widgets can be used there, and the special Post Format content can be used in other widget areas. Props obenland, see <a href="http://core.trac.wordpress.org/ticket/25028">#25028</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpcontentthemestwentyfourteenfrontpagephp">trunk/src/wp-content/themes/twentyfourteen/front-page.php</a></li>
<li><a href="#trunksrcwpcontentthemestwentyfourteenfunctionsphp">trunk/src/wp-content/themes/twentyfourteen/functions.php</a></li>
<li><a href="#trunksrcwpcontentthemestwentyfourteenrtlcss">trunk/src/wp-content/themes/twentyfourteen/rtl.css</a></li>
<li><a href="#trunksrcwpcontentthemestwentyfourteensidebarcontentphp">trunk/src/wp-content/themes/twentyfourteen/sidebar-content.php</a></li>
<li><a href="#trunksrcwpcontentthemestwentyfourteensidebarfooterphp">trunk/src/wp-content/themes/twentyfourteen/sidebar-footer.php</a></li>
<li><a href="#trunksrcwpcontentthemestwentyfourteenstylecss">trunk/src/wp-content/themes/twentyfourteen/style.css</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunksrcwpcontentthemestwentyfourteenincwidgetsphp">trunk/src/wp-content/themes/twentyfourteen/inc/widgets.php</a></li>
<li><a href="#trunksrcwpcontentthemestwentyfourteensidebarephemeraphp">trunk/src/wp-content/themes/twentyfourteen/sidebar-ephemera.php</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunksrcwpcontentthemestwentyfourteenrecentformattedpostsphp">trunk/src/wp-content/themes/twentyfourteen/recent-formatted-posts.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpcontentthemestwentyfourteenfrontpagephp"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-content/themes/twentyfourteen/front-page.php (25089 => 25090)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-content/themes/twentyfourteen/front-page.php        2013-08-22 17:11:32 UTC (rev 25089)
+++ trunk/src/wp-content/themes/twentyfourteen/front-page.php   2013-08-22 18:05:56 UTC (rev 25090)
</span><span class="lines">@@ -38,7 +38,7 @@
</span><span class="cx">                                  </div><!-- #content .site-content -->
</span><span class="cx">                          </div><!-- #primary .content-area -->
</span><span class="cx"> 
</span><del>-                               <?php get_template_part( 'recent-formatted-posts' ); ?>
</del><ins>+                                <?php get_sidebar( 'ephemera' ); ?>
</ins><span class="cx"> 
</span><span class="cx">                  </div><!-- .front-page-content-area -->
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunksrcwpcontentthemestwentyfourteenfunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-content/themes/twentyfourteen/functions.php (25089 => 25090)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-content/themes/twentyfourteen/functions.php 2013-08-22 17:11:32 UTC (rev 25089)
+++ trunk/src/wp-content/themes/twentyfourteen/functions.php    2013-08-22 18:05:56 UTC (rev 25090)
</span><span class="lines">@@ -131,32 +131,45 @@
</span><span class="cx">  * @return void
</span><span class="cx">  */
</span><span class="cx"> function twentyfourteen_widgets_init() {
</span><ins>+       require get_template_directory() . '/inc/widgets.php';
+       register_widget( 'Twenty_Fourteen_Ephemera_Widget' );
+
</ins><span class="cx">   register_sidebar( array(
</span><del>-               'name' => __( 'Primary Sidebar', 'twentyfourteen' ),
-               'id' => 'sidebar-1',
-               'description' => __( 'Main sidebar that appears on the left.', 'twentyfourteen' ),
</del><ins>+                'name'          => __( 'Primary Sidebar', 'twentyfourteen' ),
+               'id'            => 'sidebar-1',
+               'description'   => __( 'Main sidebar that appears on the left.', 'twentyfourteen' ),
</ins><span class="cx">           'before_widget' => '<aside id="%1$s" class="widget %2$s">',
</span><del>-               'after_widget' => '</aside>',
-               'before_title' => '<h1 class="widget-title">',
-               'after_title' => '</h1>',
</del><ins>+                'after_widget'  => '</aside>',
+               'before_title'  => '<h1 class="widget-title">',
+               'after_title'   => '</h1>',
</ins><span class="cx">   ) );
</span><span class="cx">  register_sidebar( array(
</span><del>-               'name' => __( 'Content Sidebar', 'twentyfourteen' ),
-               'id' => 'sidebar-2',
-               'description' => __( 'Additional sidebar that appears on the right, on single posts and pages.', 'twentyfourteen' ),
</del><ins>+                'name'          => __( 'Front Page Sidebar', 'twentyfourteen' ),
+               'id'            => 'sidebar-2',
+               'description'   => __( 'Additional sidebar that appears on the right, on the home page.', 'twentyfourteen' ),
</ins><span class="cx">           'before_widget' => '<aside id="%1$s" class="widget %2$s">',
</span><del>-               'after_widget' => '</aside>',
-               'before_title' => '<h1 class="widget-title">',
-               'after_title' => '</h1>',
</del><ins>+                'after_widget'  => '</aside>',
+               'before_title'  => '<h1 class="widget-title">',
+               'after_title'   => '</h1>',
</ins><span class="cx">   ) );
</span><span class="cx">  register_sidebar( array(
</span><del>-               'name' => __( 'Footer Widget Area', 'twentyfourteen' ),
-               'id' => 'sidebar-3',
</del><ins>+                'name'          => __( 'Content Sidebar', 'twentyfourteen' ),
+               'id'            => 'sidebar-3',
+               'description'   => __( 'Additional sidebar that appears on the right, on single posts and pages.', 'twentyfourteen' ),
</ins><span class="cx">           'before_widget' => '<aside id="%1$s" class="widget %2$s">',
</span><del>-               'after_widget' => '</aside>',
-               'before_title' => '<h1 class="widget-title">',
-               'after_title' => '</h1>',
</del><ins>+                'after_widget'  => '</aside>',
+               'before_title'  => '<h1 class="widget-title">',
+               'after_title'   => '</h1>',
</ins><span class="cx">   ) );
</span><ins>+       register_sidebar( array(
+               'name'          => __( 'Footer Widget Area', 'twentyfourteen' ),
+               'id'            => 'sidebar-4',
+               'description'   => __( 'Appears in the footer section of the site.', 'twentyfourteen' ),
+               'before_widget' => '<aside id="%1$s" class="widget %2$s">',
+               'after_widget'  => '</aside>',
+               'before_title'  => '<h1 class="widget-title">',
+               'after_title'   => '</h1>',
+       ) );
</ins><span class="cx"> }
</span><span class="cx"> add_action( 'widgets_init', 'twentyfourteen_widgets_init' );
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunksrcwpcontentthemestwentyfourteenincwidgetsphp"></a>
<div class="addfile"><h4>Added: trunk/src/wp-content/themes/twentyfourteen/inc/widgets.php (0 => 25090)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-content/themes/twentyfourteen/inc/widgets.php                               (rev 0)
+++ trunk/src/wp-content/themes/twentyfourteen/inc/widgets.php  2013-08-22 18:05:56 UTC (rev 25090)
</span><span class="lines">@@ -0,0 +1,248 @@
</span><ins>+<?php
+/**
+ * Makes a custom Widget for displaying Aside, Quote, Video, Image, Gallery,
+ * and Link posts, available with Twenty Fourteen.
+ *
+ * Learn more: http://codex.wordpress.org/Widgets_API#Developing_Widgets
+ *
+ * @package WordPress
+ * @subpackage Twenty_Fourteen
+ */
+
+class Twenty_Fourteen_Ephemera_Widget extends WP_Widget {
+
+       /**
+        * The supported post formats.
+        *
+        * @var array
+        */
+       private $formats = array( 'aside', 'image', 'video', 'quote', 'link', 'gallery' );
+
+       /**
+        * Pluralized post format strings.
+        *
+        * @var array
+        */
+       private $format_strings;
+
+       /**
+        * Constructor.
+        *
+        * @return Twenty_Fourteen_Ephemera_Widget
+        */
+       public function __construct() {
+               parent::__construct( 'widget_twentyfourteen_ephemera', __( 'Twenty Fourteen Ephemera', 'twentyfourteen' ), array(
+                       'classname'   => 'widget_twentyfourteen_ephemera',
+                       'description' => __( 'Use this widget to list your recent Aside, Quote, Video, Image, Gallery, and Link posts', 'twentyfourteen' ),
+               ) );
+
+               /**
+                * @todo http://core.trac.wordpress.org/ticket/23257
+                */
+               $this->format_strings = array(
+                       'aside'   => __( 'Asides',    'twentyfourteen' ),
+                       'image'   => __( 'Images',    'twentyfourteen' ),
+                       'video'   => __( 'Videos',    'twentyfourteen' ),
+                       'quote'   => __( 'Quotes',    'twentyfourteen' ),
+                       'link'    => __( 'Links',     'twentyfourteen' ),
+                       'gallery' => __( 'Galleries', 'twentyfourteen' ),
+               );
+
+               add_action( 'save_post',    array( $this, 'flush_widget_cache' ) );
+               add_action( 'deleted_post', array( $this, 'flush_widget_cache' ) );
+               add_action( 'switch_theme', array( $this, 'flush_widget_cache' ) );
+       }
+
+       /**
+        * Outputs the HTML for this widget.
+        *
+        * @param array $args An array of standard parameters for widgets in this theme.
+        * @param array $instance An array of settings for this widget instance.
+        * @return void Echoes its output.
+        */
+       public function widget( $args, $instance ) {
+               // If called directly, assign an unique index for caching.
+               if ( -1 == $this->number ) {
+                       static $num = -1;
+                       $this->_set( --$num );
+               }
+
+               $content = get_transient( $this->id );
+
+               if ( false !== $content ) {
+                       echo $content;
+                       return;
+               }
+
+               ob_start();
+               extract( $args, EXTR_SKIP );
+
+               $format = $instance['format'];
+               $number = empty( $instance['number'] ) ? 2 : absint( $instance['number'] );
+               $title  = apply_filters( 'widget_title', empty( $instance['title'] ) ? $this->format_strings[ $format ] : $instance['title'], $instance, $this->id_base );
+
+               $ephemera = new WP_Query( array(
+                       'order'          => 'DESC',
+                       'posts_per_page' => $number,
+                       'no_found_rows'  => true,
+                       'post_status'    => 'publish',
+                       'post__not_in'   => get_option( 'sticky_posts' ),
+                       'tax_query'      => array(
+                               array(
+                                       'taxonomy' => 'post_format',
+                                       'terms'    => array( "post-format-$format" ),
+                                       'field'    => 'slug',
+                                       'operator' => 'IN',
+                               ),
+                       ),
+               ) );
+
+               if ( $ephemera->have_posts() ) :
+                       $tmp_content_width = $GLOBALS['content_width'];
+                       $GLOBALS['content_width'] = 306;
+
+                       echo $before_widget;
+                       ?>
+                       <h1 class="widget-title genericon <?php echo esc_attr( $format ); ?>">
+                               <a class="entry-format" href="<?php echo esc_url( get_post_format_link( $format ) ); ?>"><?php echo $title; ?></a>
+                       </h1>
+                       <ol>
+
+                               <?php while ( $ephemera->have_posts() ) : $ephemera->the_post(); ?>
+                               <li>
+                               <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
+                                       <div class="entry-content">
+                                               <?php
+                                                       if ( has_post_format( 'gallery' ) ) :
+                                                               $images = get_posts( array(
+                                                                       'post_parent'    => get_post()->post_parent,
+                                                                       'fields'         => 'ids',
+                                                                       'numberposts'    => -1,
+                                                                       'post_status'    => 'inherit',
+                                                                       'post_type'      => 'attachment',
+                                                                       'post_mime_type' => 'image',
+                                                                       'order'          => 'ASC',
+                                                                       'orderby'        => 'menu_order ID'
+                                                               ) );
+                                                               $total_images = count( $images );
+
+                                                               if ( has_post_thumbnail() ) :
+                                                                       $featured_image = get_the_post_thumbnail( get_the_ID(), 'featured-thumbnail-formatted' );
+                                                               elseif ( $total_images > 0 ) :
+                                                                       $image          = array_shift( $images );
+                                                                       $featured_image = wp_get_attachment_image( $image, 'featured-thumbnail-formatted' );
+                                                               endif;
+                                               ?>
+                                               <a href="<?php the_permalink(); ?>"><?php echo $featured_image; ?></a>
+                                               <p class="wp-caption-text">
+                                                       <?php
+                                                               printf( _n( 'This gallery contains <a href="%1$s" rel="bookmark">%2$s photo</a>.', 'This gallery contains <a href="%1$s" rel="bookmark">%2$s photos</a>.', $total_images, 'twentyfourteen' ),
+                                                                       esc_url( get_permalink() ),
+                                                                       number_format_i18n( $total_images )
+                                                               );
+                                                       ?>
+                                               </p>
+                                               <?php
+                                                       else :
+                                                               the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ) );
+                                                       endif;
+                                               ?>
+                                       </div><!-- .entry-content -->
+
+                                       <header class="entry-header">
+                                               <div class="entry-meta">
+                                                       <?php
+                                                               if ( ! has_post_format( 'link' ) ) :
+                                                                       the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
+                                                               endif;
+
+                                                               printf( __( '<span class="entry-date"><a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s">%4$s</time></a></span> <span class="byline"><span class="author vcard"><a class="url fn n" href="%5$s" title="%6$s" rel="author">%7$s</a></span></span>', 'twentyfourteen' ),
+                                                                       esc_url( get_permalink() ),
+                                                                       esc_attr( get_the_time() ),
+                                                                       esc_attr( get_the_date( 'c' ) ),
+                                                                       esc_html( get_the_date() ),
+                                                                       esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
+                                                                       esc_attr( sprintf( __( 'View all posts by %s', 'twentyfourteen' ), get_the_author() ) ),
+                                                                       get_the_author()
+                                                               );
+
+                                                               if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) :
+                                                       ?>
+                                                       <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span>
+                                                       <?php endif; ?>
+                                               </div><!-- .entry-meta -->
+                                       </header><!-- .entry-header -->
+                               </article><!-- #post-## -->
+                               </li>
+                               <?php endwhile; ?>
+
+                       </ol>
+                       <a class="post-format-archive-link" href="<?php echo esc_url( get_post_format_link( $format ) ); ?>"><?php printf( __( 'More %s <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ), $this->format_strings[ $format ] ); ?></a>
+                       <?php
+
+                       echo $after_widget;
+
+                       // Reset the post globals as this query will have stomped on it.
+                       wp_reset_postdata();
+
+                       $GLOBALS['content_width'] = $tmp_content_width;
+
+               endif; // End check for ephemeral posts.
+
+               set_transient( $this->id, ob_get_flush() );
+       }
+
+       /**
+        * Deals with the settings when they are saved by the admin. Here is where
+        * any validation should be dealt with.
+        *
+        * @param array $new_instance
+        * @param array $instance
+        * @return array
+        */
+       function update( $new_instance, $instance ) {
+               $instance['title']  = strip_tags( $new_instance['title'] );
+               $instance['number'] = empty( $new_instance['number'] ) ? 2 : absint( $new_instance['number'] );
+               if ( in_array( $new_instance['format'], $this->formats ) )
+                       $instance['format'] = $new_instance['format'];
+
+               $this->flush_widget_cache();
+
+               return $instance;
+       }
+
+       /**
+        * Deletes the transient.
+        *
+        * @return void
+        */
+       function flush_widget_cache() {
+               delete_transient( $this->id );
+       }
+
+       /**
+        * Displays the form for this widget on the Widgets page of the Admin area.
+        *
+        * @param array $instance
+        * @return void
+        */
+       function form( $instance ) {
+               $title  = empty( $instance['title'] ) ? '' : esc_attr( $instance['title'] );
+               $number = empty( $instance['number'] ) ? 2 : absint( $instance['number'] );
+               $format = isset( $instance['format'] ) && in_array( $instance['format'], $this->formats ) ? $instance['format'] : 'aside';
+               ?>
+                       <p><label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"><?php _e( 'Title:', 'twentyfourteen' ); ?></label>
+                       <input id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>" class="widefat" name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" /></p>
+
+                       <p><label for="<?php echo esc_attr( $this->get_field_id( 'number' ) ); ?>"><?php _e( 'Number of posts to show:', 'twentyfourteen' ); ?></label>
+                       <input id="<?php echo esc_attr( $this->get_field_id( 'number' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'number' ) ); ?>" type="text" value="<?php echo esc_attr( $number ); ?>" size="3" /></p>
+
+                       <p><label for="<?php echo esc_attr( $this->get_field_id( 'format' ) ); ?>"><?php _e( 'Post format to show:', 'twentyfourteen' ); ?></label>
+                       <select id="<?php echo esc_attr( $this->get_field_id( 'format' ) ); ?>" class="widefat" name="<?php echo esc_attr( $this->get_field_name( 'format' ) ); ?>">
+                               <?php foreach ( $this->formats as $slug ) : ?>
+                               <option value="<?php echo esc_attr( $slug ); ?>"<?php selected( $format, $slug ); ?>><?php echo get_post_format_string( $slug ); ?></option>
+                               <?php endforeach; ?>
+                       </select>
+               <?php
+       }
+}
</ins></span></pre></div>
<a id="trunksrcwpcontentthemestwentyfourteenrecentformattedpostsphp"></a>
<div class="delfile"><h4>Deleted: trunk/src/wp-content/themes/twentyfourteen/recent-formatted-posts.php (25089 => 25090)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-content/themes/twentyfourteen/recent-formatted-posts.php    2013-08-22 17:11:32 UTC (rev 25089)
+++ trunk/src/wp-content/themes/twentyfourteen/recent-formatted-posts.php       2013-08-22 18:05:56 UTC (rev 25090)
</span><span class="lines">@@ -1,120 +0,0 @@
</span><del>-<?php
-/**
- * A template to display recent post formatted posts.
- *
- * @package WordPress
- * @subpackage Twenty_Fourteen
- */
-?>
-
-<div class="post-formatted-posts">
-<?php
-       do_action( 'before_sidebar' );
-       do_action( 'twentyfourteen_formatted_posts_before' );
-       $recent_videos = twentyfourteen_get_recent( 'post-format-video' );
-       if ( $recent_videos->have_posts() ) :
-?>
-       <section id="recent-videos" class="recent-videos">
-               <h1 class="format-title genericon">
-                       <a class="entry-format" href="<?php echo esc_url( get_post_format_link( 'video' ) ); ?>" title="<?php esc_attr_e( 'All Video Posts', 'twentyfourteen' ); ?>"><?php _e( 'Videos', 'twentyfourteen' ); ?></a>
-               </h1>
-               <?php
-                       while ( $recent_videos->have_posts() ) : $recent_videos->the_post();
-                               get_template_part( 'content', 'recent-formatted-post' );
-                       endwhile;
-               ?>
-               <a class="more-formatted-posts-link" href="<?php echo esc_url( get_post_format_link( 'video' ) ); ?>" title="<?php esc_attr_e( 'More Videos', 'twentyfourteen' ); ?>"><?php _e( 'More Videos <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ); ?></a>
-       </section>
-<?php endif; ?>
-
-<?php
-       $recent_images = twentyfourteen_get_recent( 'post-format-image' );
-       if ( $recent_images->have_posts() ) :
-?>
-       <section id="recent-images" class="recent-images">
-               <h1 class="format-title genericon">
-                       <a class="entry-format" href="<?php echo esc_url( get_post_format_link( 'image' ) ); ?>" title="<?php esc_attr_e( 'All Image Posts', 'twentyfourteen' ); ?>"><?php _e( 'Images', 'twentyfourteen' ); ?></a>
-               </h1>
-               <?php
-                       while ( $recent_images->have_posts() ) : $recent_images->the_post();
-                               get_template_part( 'content', 'recent-formatted-post' );
-                       endwhile;
-               ?>
-               <a class="more-formatted-posts-link" href="<?php echo esc_url( get_post_format_link( 'image' ) ); ?>" title="<?php esc_attr_e( 'More images', 'twentyfourteen' ); ?>"><?php _e( 'More images <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ); ?></a>
-       </section>
-<?php endif; ?>
-
-<?php
-       $recent_galleries = twentyfourteen_get_recent( 'post-format-gallery' );
-       if ( $recent_galleries->have_posts() ) :
-?>
-       <section id="recent-galleries" class="recent-galleries">
-               <h1 class="format-title genericon">
-                       <a class="entry-format" href="<?php echo esc_url( get_post_format_link( 'gallery' ) ); ?>" title="<?php esc_attr_e( 'All Gallery Posts', 'twentyfourteen' ); ?>"><?php _e( 'Galleries', 'twentyfourteen' ); ?></a>
-               </h1>
-               <?php
-                       while ( $recent_galleries->have_posts() ) : $recent_galleries->the_post();
-                               get_template_part( 'content', 'recent-formatted-post' );
-                       endwhile;
-               ?>
-               <a class="more-formatted-posts-link" href="<?php echo esc_url( get_post_format_link( 'gallery' ) ); ?>" title="<?php esc_attr_e( 'More Galleries', 'twentyfourteen' ); ?>"><?php _e( 'More galleries <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ); ?></a>
-       </section>
-<?php endif; ?>
-
-<?php
-       $recent_asides = twentyfourteen_get_recent( 'post-format-aside' );
-       if ( $recent_asides->have_posts() ) :
-?>
-       <section id="recent-asides" class="recent-asides">
-               <h1 class="format-title genericon">
-                       <a class="entry-format" href="<?php echo esc_url( get_post_format_link( 'aside' ) ); ?>" title="<?php esc_attr_e( 'All Aside Posts', 'twentyfourteen' ); ?>"><?php _e( 'Asides', 'twentyfourteen' ); ?></a>
-               </h1>
-               <?php
-                       while ( $recent_asides->have_posts() ) : $recent_asides->the_post();
-                               get_template_part( 'content', 'recent-formatted-post' );
-                       endwhile;
-               ?>
-               <a class="more-formatted-posts-link" href="<?php echo esc_url( get_post_format_link( 'aside' ) ); ?>" title="<?php esc_attr_e( 'More Asides', 'twentyfourteen' ); ?>"><?php _e( 'More asides <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ); ?></a>
-       </section>
-<?php endif; ?>
-
-<?php
-       $recent_links = twentyfourteen_get_recent( 'post-format-link' );
-       if ( $recent_links->have_posts() ) :
-?>
-       <section id="recent-links" class="recent-links">
-               <h1 class="format-title genericon">
-                       <a class="entry-format" href="<?php echo esc_url( get_post_format_link( 'link' ) ); ?>" title="<?php esc_attr_e( 'All Link Posts', 'twentyfourteen' ); ?>"><?php _e( 'Links', 'twentyfourteen' ); ?></a>
-               </h1>
-               <?php
-                       while ( $recent_links->have_posts() ) : $recent_links->the_post();
-                               get_template_part( 'content', 'recent-formatted-post' );
-                       endwhile;
-               ?>
-               <a class="more-formatted-posts-link" href="<?php echo esc_url( get_post_format_link( 'link' ) ); ?>" title="<?php esc_attr_e( 'More Links', 'twentyfourteen' ); ?>"><?php _e( 'More links <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ); ?></a>
-       </section>
-<?php endif; ?>
-
-<?php
-       $recent_quotes = twentyfourteen_get_recent( 'post-format-quote' );
-       if ( $recent_quotes->have_posts() ) :
-?>
-       <section id="recent-quotes" class="recent-quotes">
-               <h1 class="format-title genericon">
-                       <a class="entry-format" href="<?php echo esc_url( get_post_format_link( 'quote' ) ); ?>" title="<?php esc_attr_e( 'All Quote Posts', 'twentyfourteen' ); ?>"><?php _e( 'Quotes', 'twentyfourteen' ); ?></a>
-               </h1>
-               <?php
-                       while ( $recent_quotes->have_posts() ) : $recent_quotes->the_post();
-                               get_template_part( 'content', 'recent-formatted-post' );
-                       endwhile;
-               ?>
-               <a class="more-formatted-posts-link" href="<?php echo esc_url( get_post_format_link( 'quote' ) ); ?>" title="<?php esc_attr_e( 'More Quotes', 'twentyfourteen' ); ?>"><?php _e( 'More quotes <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ); ?></a>
-       </section>
-<?php endif; ?>
-
-<?php
-       wp_reset_postdata();
-       do_action( 'twentyfourteen_formatted_posts_after' );
-?>
-
-</div>
</del><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunksrcwpcontentthemestwentyfourteenrtlcss"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-content/themes/twentyfourteen/rtl.css (25089 => 25090)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-content/themes/twentyfourteen/rtl.css       2013-08-22 17:11:32 UTC (rev 25089)
+++ trunk/src/wp-content/themes/twentyfourteen/rtl.css  2013-08-22 18:05:56 UTC (rev 25090)
</span><span class="lines">@@ -219,7 +219,7 @@
</span><span class="cx"> /* =Post Formatted posts column
</span><span class="cx"> ----------------------------------------------- */
</span><span class="cx"> 
</span><del>-.format-title:before {
</del><ins>+.ephemera .widget-title:before {
</ins><span class="cx">   margin-left: 10px;
</span><span class="cx">  margin-left: 1.0rem;
</span><span class="cx">  margin-right: auto;
</span></span></pre></div>
<a id="trunksrcwpcontentthemestwentyfourteensidebarcontentphp"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-content/themes/twentyfourteen/sidebar-content.php (25089 => 25090)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-content/themes/twentyfourteen/sidebar-content.php   2013-08-22 17:11:32 UTC (rev 25089)
+++ trunk/src/wp-content/themes/twentyfourteen/sidebar-content.php      2013-08-22 18:05:56 UTC (rev 25090)
</span><span class="lines">@@ -9,7 +9,7 @@
</span><span class="cx"> <div id="content-sidebar" class="content-sidebar widget-area" role="complementary">
</span><span class="cx">  <?php do_action( 'before_sidebar' ); ?>
</span><span class="cx"> 
</span><del>-       <?php if ( ! dynamic_sidebar( 'sidebar-2' ) ) : ?>
</del><ins>+        <?php if ( ! dynamic_sidebar( 'sidebar-3' ) ) : ?>
</ins><span class="cx">           <aside id="search" class="widget widget_search">
</span><span class="cx">                          <?php get_search_form(); ?>
</span><span class="cx">          </aside>
</span></span></pre></div>
<a id="trunksrcwpcontentthemestwentyfourteensidebarephemeraphp"></a>
<div class="addfile"><h4>Added: trunk/src/wp-content/themes/twentyfourteen/sidebar-ephemera.php (0 => 25090)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-content/themes/twentyfourteen/sidebar-ephemera.php                          (rev 0)
+++ trunk/src/wp-content/themes/twentyfourteen/sidebar-ephemera.php     2013-08-22 18:05:56 UTC (rev 25090)
</span><span class="lines">@@ -0,0 +1,27 @@
</span><ins>+<?php
+/**
+ * A template to display recent post formatted posts.
+ *
+ * @package WordPress
+ * @subpackage Twenty_Fourteen
+ */
+?>
+
+<div id="ephemera" class="ephemera" role="complementary">
+       <?php
+               if ( ! dynamic_sidebar( 'sidebar-2' ) ) :
+                       foreach ( array( 'video', 'image', 'gallery', 'aside', 'link', 'quote' ) as $format ) :
+                               the_widget(
+                                       'Twenty_Fourteen_Ephemera_Widget',
+                                       array(
+                                               'format' => $format,
+                                       ),
+                                       array(
+                                               'before_widget' => '<aside class="widget widget_twentyfourteen_ephemera">',
+                                               'after_widget'  => '</aside>',
+                                       )
+                               );
+                       endforeach;
+               endif;
+       ?>
+</div>
</ins></span></pre></div>
<a id="trunksrcwpcontentthemestwentyfourteensidebarfooterphp"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-content/themes/twentyfourteen/sidebar-footer.php (25089 => 25090)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-content/themes/twentyfourteen/sidebar-footer.php    2013-08-22 17:11:32 UTC (rev 25089)
+++ trunk/src/wp-content/themes/twentyfourteen/sidebar-footer.php       2013-08-22 18:05:56 UTC (rev 25090)
</span><span class="lines">@@ -5,17 +5,13 @@
</span><span class="cx">  * @package WordPress
</span><span class="cx">  * @subpackage Twenty_Fourteen
</span><span class="cx">  */
</span><del>-?>
-<?php
-if (   ! is_active_sidebar( 'sidebar-3' ) )
</del><ins>+
+if ( ! is_active_sidebar( 'sidebar-4' ) )
</ins><span class="cx">   return;
</span><span class="cx"> ?>
</span><ins>+
</ins><span class="cx"> <div id="supplementary">
</span><del>-
-       <?php if ( is_active_sidebar( 'sidebar-3' ) ) : ?>
</del><span class="cx">   <div id="footer-sidebar" class="widget-area" role="complementary">
</span><del>-               <?php dynamic_sidebar( 'sidebar-3' ); ?>
</del><ins>+                <?php dynamic_sidebar( 'sidebar-4' ); ?>
</ins><span class="cx">   </div><!-- #footer-sidebar -->
</span><del>-       <?php endif; ?>
-
</del><span class="cx"> </div><!-- #supplementary -->
</span></span></pre></div>
<a id="trunksrcwpcontentthemestwentyfourteenstylecss"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-content/themes/twentyfourteen/style.css (25089 => 25090)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-content/themes/twentyfourteen/style.css     2013-08-22 17:11:32 UTC (rev 25089)
+++ trunk/src/wp-content/themes/twentyfourteen/style.css        2013-08-22 18:05:56 UTC (rev 25090)
</span><span class="lines">@@ -428,7 +428,7 @@
</span><span class="cx"> /* Animated elements */
</span><span class="cx"> .site a,
</span><span class="cx"> .more-link .meta-nav,
</span><del>-.more-formatted-posts-link .meta-nav,
</del><ins>+.post-format-archive-link .meta-nav,
</ins><span class="cx"> .attachment-featured-featured img,
</span><span class="cx"> .attachment-featured-thumbnail img,
</span><span class="cx"> .social-links-toggle,
</span><span class="lines">@@ -1028,7 +1028,7 @@
</span><span class="cx"> .group-blog .byline {
</span><span class="cx">  display: inline;
</span><span class="cx"> }
</span><del>-.post-formatted-posts .entry-title:after,
</del><ins>+.ephemera .entry-title:after,
</ins><span class="cx"> .content-area span + .entry-date:before,
</span><span class="cx"> span + .byline:before,
</span><span class="cx"> span + .comments-link:before,
</span><span class="lines">@@ -1182,23 +1182,23 @@
</span><span class="cx">  text-transform: none;
</span><span class="cx"> }
</span><span class="cx"> .more-link,
</span><del>-.more-formatted-posts-link {
</del><ins>+.post-format-archive-link {
</ins><span class="cx">   font-size: 14px;
</span><span class="cx">  font-size: 1.4rem;
</span><span class="cx">  text-transform: uppercase;
</span><span class="cx">  white-space: pre;
</span><span class="cx"> }
</span><span class="cx"> .more-link:hover,
</span><del>-.more-formatted-posts-link:hover {
</del><ins>+.post-format-archive-link:hover {
</ins><span class="cx">   text-decoration: none;
</span><span class="cx"> }
</span><span class="cx"> .more-link .meta-nav,
</span><del>-.more-formatted-posts-link .meta-nav {
</del><ins>+.post-format-archive-link .meta-nav {
</ins><span class="cx">   position: relative;
</span><span class="cx">  left: 0;
</span><span class="cx"> }
</span><span class="cx"> .more-link:hover .meta-nav,
</span><del>-.more-formatted-posts-link:hover .meta-nav {
</del><ins>+.post-format-archive-link:hover .meta-nav {
</ins><span class="cx">   left: 5px;
</span><span class="cx">  left: 0.5rem;
</span><span class="cx"> }
</span><span class="lines">@@ -1430,7 +1430,7 @@
</span><span class="cx"> /* =Post Formatted posts column
</span><span class="cx"> ----------------------------------------------- */
</span><span class="cx"> 
</span><del>-.post-formatted-posts {
</del><ins>+.ephemera {
</ins><span class="cx">   border-top: 1px solid rgba(0, 0, 0, 0.1);
</span><span class="cx">  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
</span><span class="cx">  -moz-box-sizing: border-box;
</span><span class="lines">@@ -1439,7 +1439,7 @@
</span><span class="cx">  padding: 23px 10px 0;
</span><span class="cx">  padding: 2.3rem 1.0rem 0;
</span><span class="cx"> }
</span><del>-.post-formatted-posts .format-title {
</del><ins>+.ephemera .widget-title {
</ins><span class="cx">   border-top: 5px solid #000;
</span><span class="cx">  color: #2b2b2b;
</span><span class="cx">  font-size: 14px;
</span><span class="lines">@@ -1451,10 +1451,10 @@
</span><span class="cx">  padding-top: 1px;
</span><span class="cx">  text-transform: uppercase;
</span><span class="cx"> }
</span><del>-.post-formatted-posts .entry-content a {
</del><ins>+.ephemera .entry-content a {
</ins><span class="cx">   word-wrap: break-word;
</span><span class="cx"> }
</span><del>-.format-title:before {
</del><ins>+.ephemera .widget-title:before {
</ins><span class="cx">   background-color: #000;
</span><span class="cx">  color: #fff;
</span><span class="cx">  margin-top: -1px;
</span><span class="lines">@@ -1467,34 +1467,34 @@
</span><span class="cx">  width: 36px;
</span><span class="cx">  width: 3.6rem;
</span><span class="cx"> }
</span><del>-.recent-videos .format-title:before {
</del><ins>+.ephemera .video.widget-title:before {
</ins><span class="cx">   content: '\F104';
</span><span class="cx"> }
</span><del>-.recent-images .format-title:before {
</del><ins>+.ephemera .image.widget-title:before {
</ins><span class="cx">   content: '\F102';
</span><span class="cx"> }
</span><del>-.recent-galleries .format-title:before {
</del><ins>+.ephemera .gallery.widget-title:before {
</ins><span class="cx">   content: '\F103';
</span><span class="cx"> }
</span><del>-.recent-asides .format-title:before {
</del><ins>+.ephemera .aside.widget-title:before {
</ins><span class="cx">   content: '\F101';
</span><span class="cx"> }
</span><del>-.recent-quotes .format-title:before {
</del><ins>+.ephemera .quote.widget-title:before {
</ins><span class="cx">   content: '\F106';
</span><span class="cx"> }
</span><del>-.recent-links .format-title:before {
</del><ins>+.ephemera .link.widget-title:before {
</ins><span class="cx">   content: '\F107';
</span><span class="cx"> }
</span><del>-.post-formatted-posts .hentry {
</del><ins>+.ephemera .hentry {
</ins><span class="cx">   border-bottom: 1px solid rgba(0, 0, 0, 0.1);
</span><span class="cx">  margin-bottom: 18px;
</span><span class="cx">  margin-bottom: 1.8rem;
</span><span class="cx"> }
</span><del>-.post-formatted-posts .hentry:last-of-type {
</del><ins>+.ephemera .hentry:last-of-type {
</ins><span class="cx">   margin-bottom: 9px;
</span><span class="cx">  margin-bottom: 0.9rem;
</span><span class="cx"> }
</span><del>-.post-formatted-posts .entry-title {
</del><ins>+.ephemera .entry-title {
</ins><span class="cx">   display: inline;
</span><span class="cx">  font-size: 12px;
</span><span class="cx">  font-size: 1.2rem;
</span><span class="lines">@@ -1503,50 +1503,50 @@
</span><span class="cx">  margin: 0 0 6px 0;
</span><span class="cx">  margin: 0 0 0.6rem 0;
</span><span class="cx"> }
</span><del>-.post-formatted-posts .entry-meta {
</del><ins>+.ephemera .entry-meta {
</ins><span class="cx">   color: rgba(0, 0, 0, 0.2);
</span><span class="cx">  line-height: 1.5;
</span><span class="cx">  margin-bottom: 18px;
</span><span class="cx">  margin-bottom: 1.8rem;
</span><span class="cx"> }
</span><del>-.post-formatted-posts .entry-meta a {
</del><ins>+.ephemera .entry-meta a {
</ins><span class="cx">   color: #767676;
</span><span class="cx"> }
</span><del>-.post-formatted-posts .entry-meta a:hover {
</del><ins>+.ephemera .entry-meta a:hover {
</ins><span class="cx">   color: #2b2b2b;
</span><span class="cx"> }
</span><del>-.post-formatted-posts .entry-content p:not(.wp-caption-text) {
</del><ins>+.ephemera .entry-content p:not(.wp-caption-text) {
</ins><span class="cx">   font-size: 13px;
</span><span class="cx">  font-size: 1.3rem;
</span><span class="cx">  line-height: 1.3846153846;
</span><span class="cx">  margin-bottom: 18px;
</span><span class="cx">  margin-bottom: 1.8rem;
</span><span class="cx"> }
</span><del>-.post-formatted-posts .entry-content blockquote p cite {
</del><ins>+.ephemera .entry-content blockquote p cite {
</ins><span class="cx">   font-size: 13px;
</span><span class="cx">  font-size: 1.3rem;
</span><span class="cx">  line-height: 1.3846153846;
</span><span class="cx"> }
</span><del>-.post-formatted-posts .wp-caption {
</del><ins>+.ephemera .wp-caption {
</ins><span class="cx">   margin-bottom: 18px;
</span><span class="cx">  margin-bottom: 1.8rem;
</span><span class="cx"> }
</span><del>-.post-formatted-posts .wp-caption-text {
</del><ins>+.ephemera .wp-caption-text {
</ins><span class="cx">   line-height: 1.5;
</span><span class="cx">  margin: 6px 0 0;
</span><span class="cx">  margin: 0.6rem 0 0;
</span><span class="cx">  padding: 0;
</span><span class="cx"> }
</span><del>-.post-formatted-posts .format-gallery .wp-caption-text {
</del><ins>+.ephemera .format-gallery .wp-caption-text {
</ins><span class="cx">   margin-bottom: 18px;
</span><span class="cx">  margin-bottom: 1.8rem;
</span><span class="cx"> }
</span><del>-.post-formatted-posts .more-link {
</del><ins>+.ephemera .more-link {
</ins><span class="cx">   font-size: 12px;
</span><span class="cx">  font-size: 1.2rem;
</span><span class="cx">  line-height: 1.5;
</span><span class="cx"> }
</span><del>-.post-formatted-posts .more-formatted-posts-link {
</del><ins>+.ephemera .post-format-archive-link {
</ins><span class="cx">   display: inline-block;
</span><span class="cx">  font-size: 12px;
</span><span class="cx">  font-size: 1.2rem;
</span><span class="lines">@@ -2106,7 +2106,6 @@
</span><span class="cx">  margin-left: 1px;
</span><span class="cx">  margin-left: 0.1rem;
</span><span class="cx"> }
</span><del>-.widget div:last-child,
</del><span class="cx"> .widget table:last-child,
</span><span class="cx"> .widget iframe:last-child,
</span><span class="cx"> .widget p:last-child,
</span><span class="lines">@@ -2518,7 +2517,7 @@
</span><span class="cx">          padding: 3.6rem 1.0rem 2.4rem 0;
</span><span class="cx">          width: 30.35714285%;
</span><span class="cx">  }
</span><del>-       .post-formatted-posts {
</del><ins>+        .ephemera {
</ins><span class="cx">           border: none;
</span><span class="cx">          clear: none;
</span><span class="cx">          float: right;
</span><span class="lines">@@ -2823,7 +2822,7 @@
</span><span class="cx">          margin: 0 27.31707317% 0 22.2rem;
</span><span class="cx">  }
</span><span class="cx">  .content-sidebar,
</span><del>-       .post-formatted-posts {
</del><ins>+        .ephemera {
</ins><span class="cx">           margin: 0 0 0 -27.31707317%;
</span><span class="cx">          width: 24.87804878%;
</span><span class="cx">  }
</span><span class="lines">@@ -3055,7 +3054,7 @@
</span><span class="cx">          max-width: 126.0rem;
</span><span class="cx">  }
</span><span class="cx">  .content-sidebar,
</span><del>-       .post-formatted-posts {
</del><ins>+        .ephemera {
</ins><span class="cx">           padding-right: 0;
</span><span class="cx">  }
</span><span class="cx">  .content-area .full-width .entry-header,
</span></span></pre>
</div>
</div>

</body>
</html>