Make WordPress Core

Ticket #25028: 25028.2.diff

File 25028.2.diff, 26.9 KB (added by obenland, 12 years ago)
  • wp-content/themes/twentyfourteen/sidebar-footer.php

     
    55 * @package WordPress
    66 * @subpackage Twenty_Fourteen
    77 */
    8 ?>
    9 <?php
    10 if (   ! is_active_sidebar( 'sidebar-3' ) )
     8
     9if ( ! is_active_sidebar( 'sidebar-4' ) )
    1110        return;
    1211?>
    13 <div id="supplementary">
    1412
    15         <?php if ( is_active_sidebar( 'sidebar-3' ) ) : ?>
     13<div id="supplementary">
    1614        <div id="footer-sidebar" class="widget-area" role="complementary">
    17                 <?php dynamic_sidebar( 'sidebar-3' ); ?>
     15                <?php dynamic_sidebar( 'sidebar-4' ); ?>
    1816        </div><!-- #footer-sidebar -->
    19         <?php endif; ?>
    20 
    2117</div><!-- #supplementary -->
  • wp-content/themes/twentyfourteen/functions.php

     
    131131 * @return void
    132132 */
    133133function twentyfourteen_widgets_init() {
     134        require get_template_directory() . '/inc/widgets.php';
     135        register_widget( 'Twenty_Fourteen_Ephemera_Widget' );
     136
     137        register_sidebar( array(
     138                'name'          => __( 'Primary Sidebar', 'twentyfourteen' ),
     139                'id'            => 'sidebar-1',
     140                'description'   => __( 'Main sidebar that appears on the left.', 'twentyfourteen' ),
     141                'before_widget' => '<aside id="%1$s" class="widget %2$s">',
     142                'after_widget'  => '</aside>',
     143                'before_title'  => '<h1 class="widget-title">',
     144                'after_title'   => '</h1>',
     145        ) );
    134146        register_sidebar( array(
    135                 'name' => __( 'Primary Sidebar', 'twentyfourteen' ),
    136                 'id' => 'sidebar-1',
    137                 'description' => __( 'Main sidebar that appears on the left.', 'twentyfourteen' ),
     147                'name'          => __( 'Front Page Sidebar', 'twentyfourteen' ),
     148                'id'            => 'sidebar-2',
     149                'description'   => __( 'Additional sidebar that appears on the right, on the home page.', 'twentyfourteen' ),
    138150                'before_widget' => '<aside id="%1$s" class="widget %2$s">',
    139                 'after_widget' => '</aside>',
    140                 'before_title' => '<h1 class="widget-title">',
    141                 'after_title' => '</h1>',
     151                'after_widget'  => '</aside>',
     152                'before_title'  => '<h1 class="widget-title">',
     153                'after_title'   => '</h1>',
    142154        ) );
    143155        register_sidebar( array(
    144                 'name' => __( 'Content Sidebar', 'twentyfourteen' ),
    145                 'id' => 'sidebar-2',
    146                 'description' => __( 'Additional sidebar that appears on the right, on single posts and pages.', 'twentyfourteen' ),
     156                'name'          => __( 'Content Sidebar', 'twentyfourteen' ),
     157                'id'            => 'sidebar-3',
     158                'description'   => __( 'Additional sidebar that appears on the right, on single posts and pages.', 'twentyfourteen' ),
    147159                'before_widget' => '<aside id="%1$s" class="widget %2$s">',
    148                 'after_widget' => '</aside>',
    149                 'before_title' => '<h1 class="widget-title">',
    150                 'after_title' => '</h1>',
     160                'after_widget'  => '</aside>',
     161                'before_title'  => '<h1 class="widget-title">',
     162                'after_title'   => '</h1>',
    151163        ) );
    152164        register_sidebar( array(
    153                 'name' => __( 'Footer Widget Area', 'twentyfourteen' ),
    154                 'id' => 'sidebar-3',
     165                'name'          => __( 'Footer Widget Area', 'twentyfourteen' ),
     166                'id'            => 'sidebar-4',
     167                'description'   => __( 'Appears in the footer section of the site.', 'twentyfourteen' ),
    155168                'before_widget' => '<aside id="%1$s" class="widget %2$s">',
    156                 'after_widget' => '</aside>',
    157                 'before_title' => '<h1 class="widget-title">',
    158                 'after_title' => '</h1>',
     169                'after_widget'  => '</aside>',
     170                'before_title'  => '<h1 class="widget-title">',
     171                'after_title'   => '</h1>',
    159172        ) );
    160173}
    161174add_action( 'widgets_init', 'twentyfourteen_widgets_init' );
  • wp-content/themes/twentyfourteen/rtl.css

     
    219219/* =Post Formatted posts column
    220220----------------------------------------------- */
    221221
    222 .format-title:before {
     222.ephemera .widget-title:before {
    223223        margin-left: 10px;
    224224        margin-left: 1.0rem;
    225225        margin-right: auto;
  • wp-content/themes/twentyfourteen/inc/widgets.php

     
     1<?php
     2/**
     3 * Makes a custom Widget for displaying Aside, Quote, Video, Image, Gallery,
     4 * and Link posts, available with Twenty Fourteen.
     5 *
     6 * Learn more: http://codex.wordpress.org/Widgets_API#Developing_Widgets
     7 *
     8 * @package WordPress
     9 * @subpackage Twenty_Fourteen
     10 */
     11
     12class Twenty_Fourteen_Ephemera_Widget extends WP_Widget {
     13
     14        /**
     15         * The supported post formats.
     16         *
     17         * @var array
     18         */
     19        private $formats = array( 'aside', 'image', 'video', 'quote', 'link', 'gallery' );
     20
     21        /**
     22         * Pluralized post format strings.
     23         *
     24         * @var array
     25         */
     26        private $format_strings;
     27
     28        /**
     29         * Constructor.
     30         *
     31         * @return Twenty_Fourteen_Ephemera_Widget
     32         */
     33        public function __construct() {
     34                parent::__construct( 'widget_twentyfourteen_ephemera', __( 'Twenty Fourteen Ephemera', 'twentyfourteen' ), array(
     35                        'classname'   => 'widget_twentyfourteen_ephemera',
     36                        'description' => __( 'Use this widget to list your recent Aside, Quote, Video, Image, Gallery, and Link posts', 'twentyfourteen' ),
     37                ) );
     38
     39                /**
     40                 * @todo http://core.trac.wordpress.org/ticket/23257
     41                 */
     42                $this->format_strings = array(
     43                        'aside'   => __( 'Asides',    'twentyfourteen' ),
     44                        'image'   => __( 'Images',    'twentyfourteen' ),
     45                        'video'   => __( 'Videos',    'twentyfourteen' ),
     46                        'quote'   => __( 'Quotes',    'twentyfourteen' ),
     47                        'link'    => __( 'Links',     'twentyfourteen' ),
     48                        'gallery' => __( 'Galleries', 'twentyfourteen' ),
     49                );
     50
     51                add_action( 'save_post',    array( $this, 'flush_widget_cache' ) );
     52                add_action( 'deleted_post', array( $this, 'flush_widget_cache' ) );
     53                add_action( 'switch_theme', array( $this, 'flush_widget_cache' ) );
     54        }
     55
     56        /**
     57         * Outputs the HTML for this widget.
     58         *
     59         * @param array $args An array of standard parameters for widgets in this theme.
     60         * @param array $instance An array of settings for this widget instance.
     61         * @return void Echoes its output.
     62         */
     63        public function widget( $args, $instance ) {
     64                // If called directly, assign an unique index for caching.
     65                if ( -1 == $this->number ) {
     66                        static $num = -1;
     67                        $this->_set( --$num );
     68                }
     69
     70                $content = get_transient( $this->id );
     71
     72                if ( false !== $content ) {
     73                        echo $content;
     74                        return;
     75                }
     76
     77                ob_start();
     78                extract( $args, EXTR_SKIP );
     79
     80                $format = $instance['format'];
     81                $number = empty( $instance['number'] ) ? 2 : absint( $instance['number'] );
     82                $title  = apply_filters( 'widget_title', empty( $instance['title'] ) ? $this->format_strings[ $format ] : $instance['title'], $instance, $this->id_base );
     83
     84                $ephemera = new WP_Query( array(
     85                        'order'          => 'DESC',
     86                        'posts_per_page' => $number,
     87                        'no_found_rows'  => true,
     88                        'post_status'    => 'publish',
     89                        'post__not_in'   => get_option( 'sticky_posts' ),
     90                        'tax_query'      => array(
     91                                array(
     92                                        'taxonomy' => 'post_format',
     93                                        'terms'    => array( "post-format-$format" ),
     94                                        'field'    => 'slug',
     95                                        'operator' => 'IN',
     96                                ),
     97                        ),
     98                ) );
     99
     100                if ( $ephemera->have_posts() ) :
     101                        $tmp_content_width = $GLOBALS['content_width'];
     102                        $GLOBALS['content_width'] = 306;
     103
     104                        echo $before_widget;
     105                        ?>
     106                        <h1 class="widget-title genericon <?php echo esc_attr( $format ); ?>">
     107                                <a class="entry-format" href="<?php echo esc_url( get_post_format_link( $format ) ); ?>"><?php echo $title; ?></a>
     108                        </h1>
     109                        <ol>
     110
     111                                <?php while ( $ephemera->have_posts() ) : $ephemera->the_post(); ?>
     112                                <li>
     113                                <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
     114                                        <div class="entry-content">
     115                                                <?php
     116                                                        if ( has_post_format( 'gallery' ) ) :
     117                                                                $images = get_posts( array(
     118                                                                        'post_parent'    => get_post()->post_parent,
     119                                                                        'fields'         => 'ids',
     120                                                                        'numberposts'    => -1,
     121                                                                        'post_status'    => 'inherit',
     122                                                                        'post_type'      => 'attachment',
     123                                                                        'post_mime_type' => 'image',
     124                                                                        'order'          => 'ASC',
     125                                                                        'orderby'        => 'menu_order ID'
     126                                                                ) );
     127                                                                $total_images = count( $images );
     128
     129                                                                if ( has_post_thumbnail() ) :
     130                                                                        $featured_image = get_the_post_thumbnail( get_the_ID(), 'featured-thumbnail-formatted' );
     131                                                                elseif ( $total_images > 0 ) :
     132                                                                        $image          = array_shift( $images );
     133                                                                        $featured_image = wp_get_attachment_image( $image, 'featured-thumbnail-formatted' );
     134                                                                endif;
     135                                                ?>
     136                                                <a href="<?php the_permalink(); ?>"><?php echo $featured_image; ?></a>
     137                                                <p class="wp-caption-text">
     138                                                        <?php
     139                                                                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' ),
     140                                                                        esc_url( get_permalink() ),
     141                                                                        number_format_i18n( $total_images )
     142                                                                );
     143                                                        ?>
     144                                                </p>
     145                                                <?php
     146                                                        else :
     147                                                                the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ) );
     148                                                        endif;
     149                                                ?>
     150                                        </div><!-- .entry-content -->
     151
     152                                        <header class="entry-header">
     153                                                <div class="entry-meta">
     154                                                        <?php
     155                                                                if ( ! has_post_format( 'link' ) ) :
     156                                                                        the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
     157                                                                endif;
     158
     159                                                                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' ),
     160                                                                        esc_url( get_permalink() ),
     161                                                                        esc_attr( get_the_time() ),
     162                                                                        esc_attr( get_the_date( 'c' ) ),
     163                                                                        esc_html( get_the_date() ),
     164                                                                        esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
     165                                                                        esc_attr( sprintf( __( 'View all posts by %s', 'twentyfourteen' ), get_the_author() ) ),
     166                                                                        get_the_author()
     167                                                                );
     168
     169                                                                if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) :
     170                                                        ?>
     171                                                        <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span>
     172                                                        <?php endif; ?>
     173                                                </div><!-- .entry-meta -->
     174                                        </header><!-- .entry-header -->
     175                                </article><!-- #post-## -->
     176                                </li>
     177                                <?php endwhile; ?>
     178
     179                        </ol>
     180                        <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>
     181                        <?php
     182
     183                        echo $after_widget;
     184
     185                        // Reset the post globals as this query will have stomped on it.
     186                        wp_reset_postdata();
     187
     188                        $GLOBALS['content_width'] = $tmp_content_width;
     189
     190                endif; // End check for ephemeral posts.
     191
     192                set_transient( $this->id, ob_get_flush() );
     193        }
     194
     195        /**
     196         * Deals with the settings when they are saved by the admin. Here is where
     197         * any validation should be dealt with.
     198         *
     199         * @param array $new_instance
     200         * @param array $instance
     201         * @return array
     202         */
     203        function update( $new_instance, $instance ) {
     204                $instance['title']  = strip_tags( $new_instance['title'] );
     205                $instance['number'] = empty( $new_instance['number'] ) ? 2 : absint( $new_instance['number'] );
     206                if ( in_array( $new_instance['format'], $this->formats ) )
     207                        $instance['format'] = $new_instance['format'];
     208
     209                $this->flush_widget_cache();
     210
     211                return $instance;
     212        }
     213
     214        /**
     215         * Deletes the transient.
     216         *
     217         * @return void
     218         */
     219        function flush_widget_cache() {
     220                delete_transient( $this->id );
     221        }
     222
     223        /**
     224         * Displays the form for this widget on the Widgets page of the Admin area.
     225         *
     226         * @param array $instance
     227         * @return void
     228         */
     229        function form( $instance ) {
     230                $title  = empty( $instance['title'] ) ? '' : esc_attr( $instance['title'] );
     231                $number = empty( $instance['number'] ) ? 2 : absint( $instance['number'] );
     232                $format = isset( $instance['format'] ) && in_array( $instance['format'], $this->formats ) ? $instance['format'] : 'aside';
     233                ?>
     234                        <p><label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"><?php _e( 'Title:', 'twentyfourteen' ); ?></label>
     235                        <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>
     236
     237                        <p><label for="<?php echo esc_attr( $this->get_field_id( 'number' ) ); ?>"><?php _e( 'Number of posts to show:', 'twentyfourteen' ); ?></label>
     238                        <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>
     239
     240                        <p><label for="<?php echo esc_attr( $this->get_field_id( 'format' ) ); ?>"><?php _e( 'Post format to show:', 'twentyfourteen' ); ?></label>
     241                        <select id="<?php echo esc_attr( $this->get_field_id( 'format' ) ); ?>" class="widefat" name="<?php echo esc_attr( $this->get_field_name( 'format' ) ); ?>">
     242                                <?php foreach ( $this->formats as $slug ) : ?>
     243                                <option value="<?php echo esc_attr( $slug ); ?>"<?php selected( $format, $slug ); ?>><?php echo get_post_format_string( $slug ); ?></option>
     244                                <?php endforeach; ?>
     245                        </select>
     246                <?php
     247        }
     248}
  • wp-content/themes/twentyfourteen/front-page.php

     
    3838                                        </div><!-- #content .site-content -->
    3939                                </div><!-- #primary .content-area -->
    4040
    41                                 <?php get_template_part( 'recent-formatted-posts' ); ?>
     41                                <?php get_sidebar( 'ephemera' ); ?>
    4242
    4343                        </div><!-- .front-page-content-area -->
    4444
  • wp-content/themes/twentyfourteen/recent-formatted-posts.php

     
    1 <?php
    2 /**
    3  * A template to display recent post formatted posts.
    4  *
    5  * @package WordPress
    6  * @subpackage Twenty_Fourteen
    7  */
    8 ?>
    9 
    10 <div class="post-formatted-posts">
    11 <?php
    12         do_action( 'before_sidebar' );
    13         do_action( 'twentyfourteen_formatted_posts_before' );
    14         $recent_videos = twentyfourteen_get_recent( 'post-format-video' );
    15         if ( $recent_videos->have_posts() ) :
    16 ?>
    17         <section id="recent-videos" class="recent-videos">
    18                 <h1 class="format-title genericon">
    19                         <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>
    20                 </h1>
    21                 <?php
    22                         while ( $recent_videos->have_posts() ) : $recent_videos->the_post();
    23                                 get_template_part( 'content', 'recent-formatted-post' );
    24                         endwhile;
    25                 ?>
    26                 <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>
    27         </section>
    28 <?php endif; ?>
    29 
    30 <?php
    31         $recent_images = twentyfourteen_get_recent( 'post-format-image' );
    32         if ( $recent_images->have_posts() ) :
    33 ?>
    34         <section id="recent-images" class="recent-images">
    35                 <h1 class="format-title genericon">
    36                         <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>
    37                 </h1>
    38                 <?php
    39                         while ( $recent_images->have_posts() ) : $recent_images->the_post();
    40                                 get_template_part( 'content', 'recent-formatted-post' );
    41                         endwhile;
    42                 ?>
    43                 <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>
    44         </section>
    45 <?php endif; ?>
    46 
    47 <?php
    48         $recent_galleries = twentyfourteen_get_recent( 'post-format-gallery' );
    49         if ( $recent_galleries->have_posts() ) :
    50 ?>
    51         <section id="recent-galleries" class="recent-galleries">
    52                 <h1 class="format-title genericon">
    53                         <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>
    54                 </h1>
    55                 <?php
    56                         while ( $recent_galleries->have_posts() ) : $recent_galleries->the_post();
    57                                 get_template_part( 'content', 'recent-formatted-post' );
    58                         endwhile;
    59                 ?>
    60                 <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>
    61         </section>
    62 <?php endif; ?>
    63 
    64 <?php
    65         $recent_asides = twentyfourteen_get_recent( 'post-format-aside' );
    66         if ( $recent_asides->have_posts() ) :
    67 ?>
    68         <section id="recent-asides" class="recent-asides">
    69                 <h1 class="format-title genericon">
    70                         <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>
    71                 </h1>
    72                 <?php
    73                         while ( $recent_asides->have_posts() ) : $recent_asides->the_post();
    74                                 get_template_part( 'content', 'recent-formatted-post' );
    75                         endwhile;
    76                 ?>
    77                 <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>
    78         </section>
    79 <?php endif; ?>
    80 
    81 <?php
    82         $recent_links = twentyfourteen_get_recent( 'post-format-link' );
    83         if ( $recent_links->have_posts() ) :
    84 ?>
    85         <section id="recent-links" class="recent-links">
    86                 <h1 class="format-title genericon">
    87                         <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>
    88                 </h1>
    89                 <?php
    90                         while ( $recent_links->have_posts() ) : $recent_links->the_post();
    91                                 get_template_part( 'content', 'recent-formatted-post' );
    92                         endwhile;
    93                 ?>
    94                 <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>
    95         </section>
    96 <?php endif; ?>
    97 
    98 <?php
    99         $recent_quotes = twentyfourteen_get_recent( 'post-format-quote' );
    100         if ( $recent_quotes->have_posts() ) :
    101 ?>
    102         <section id="recent-quotes" class="recent-quotes">
    103                 <h1 class="format-title genericon">
    104                         <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>
    105                 </h1>
    106                 <?php
    107                         while ( $recent_quotes->have_posts() ) : $recent_quotes->the_post();
    108                                 get_template_part( 'content', 'recent-formatted-post' );
    109                         endwhile;
    110                 ?>
    111                 <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>
    112         </section>
    113 <?php endif; ?>
    114 
    115 <?php
    116         wp_reset_postdata();
    117         do_action( 'twentyfourteen_formatted_posts_after' );
    118 ?>
    119 
    120 </div>
    121  No newline at end of file
  • wp-content/themes/twentyfourteen/style.css

     
    428428/* Animated elements */
    429429.site a,
    430430.more-link .meta-nav,
    431 .more-formatted-posts-link .meta-nav,
     431.post-format-archive-link .meta-nav,
    432432.attachment-featured-featured img,
    433433.attachment-featured-thumbnail img,
    434434.social-links-toggle,
     
    10281028.group-blog .byline {
    10291029        display: inline;
    10301030}
    1031 .post-formatted-posts .entry-title:after,
     1031.ephemera .entry-title:after,
    10321032.content-area span + .entry-date:before,
    10331033span + .byline:before,
    10341034span + .comments-link:before,
     
    11821182        text-transform: none;
    11831183}
    11841184.more-link,
    1185 .more-formatted-posts-link {
     1185.post-format-archive-link {
    11861186        font-size: 14px;
    11871187        font-size: 1.4rem;
    11881188        text-transform: uppercase;
    11891189        white-space: pre;
    11901190}
    11911191.more-link:hover,
    1192 .more-formatted-posts-link:hover {
     1192.post-format-archive-link:hover {
    11931193        text-decoration: none;
    11941194}
    11951195.more-link .meta-nav,
    1196 .more-formatted-posts-link .meta-nav {
     1196.post-format-archive-link .meta-nav {
    11971197        position: relative;
    11981198        left: 0;
    11991199}
    12001200.more-link:hover .meta-nav,
    1201 .more-formatted-posts-link:hover .meta-nav {
     1201.post-format-archive-link:hover .meta-nav {
    12021202        left: 5px;
    12031203        left: 0.5rem;
    12041204}
     
    14301430/* =Post Formatted posts column
    14311431----------------------------------------------- */
    14321432
    1433 .post-formatted-posts {
     1433.ephemera {
    14341434        border-top: 1px solid rgba(0, 0, 0, 0.1);
    14351435        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    14361436        -moz-box-sizing: border-box;
     
    14391439        padding: 23px 10px 0;
    14401440        padding: 2.3rem 1.0rem 0;
    14411441}
    1442 .post-formatted-posts .format-title {
     1442.ephemera .widget-title {
    14431443        border-top: 5px solid #000;
    14441444        color: #2b2b2b;
    14451445        font-size: 14px;
     
    14511451        padding-top: 1px;
    14521452        text-transform: uppercase;
    14531453}
    1454 .post-formatted-posts .entry-content a {
     1454.ephemera .entry-content a {
    14551455        word-wrap: break-word;
    14561456}
    1457 .format-title:before {
     1457.ephemera .widget-title:before {
    14581458        background-color: #000;
    14591459        color: #fff;
    14601460        margin-top: -1px;
     
    14671467        width: 36px;
    14681468        width: 3.6rem;
    14691469}
    1470 .recent-videos .format-title:before {
     1470.ephemera .video.widget-title:before {
    14711471        content: '\F104';
    14721472}
    1473 .recent-images .format-title:before {
     1473.ephemera .image.widget-title:before {
    14741474        content: '\F102';
    14751475}
    1476 .recent-galleries .format-title:before {
     1476.ephemera .gallery.widget-title:before {
    14771477        content: '\F103';
    14781478}
    1479 .recent-asides .format-title:before {
     1479.ephemera .aside.widget-title:before {
    14801480        content: '\F101';
    14811481}
    1482 .recent-quotes .format-title:before {
     1482.ephemera .quote.widget-title:before {
    14831483        content: '\F106';
    14841484}
    1485 .recent-links .format-title:before {
     1485.ephemera .link.widget-title:before {
    14861486        content: '\F107';
    14871487}
    1488 .post-formatted-posts .hentry {
     1488.ephemera .hentry {
    14891489        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    14901490        margin-bottom: 18px;
    14911491        margin-bottom: 1.8rem;
    14921492}
    1493 .post-formatted-posts .hentry:last-of-type {
     1493.ephemera .hentry:last-of-type {
    14941494        margin-bottom: 9px;
    14951495        margin-bottom: 0.9rem;
    14961496}
    1497 .post-formatted-posts .entry-title {
     1497.ephemera .entry-title {
    14981498        display: inline;
    14991499        font-size: 12px;
    15001500        font-size: 1.2rem;
     
    15031503        margin: 0 0 6px 0;
    15041504        margin: 0 0 0.6rem 0;
    15051505}
    1506 .post-formatted-posts .entry-meta {
     1506.ephemera .entry-meta {
    15071507        color: rgba(0, 0, 0, 0.2);
    15081508        line-height: 1.5;
    15091509        margin-bottom: 18px;
    15101510        margin-bottom: 1.8rem;
    15111511}
    1512 .post-formatted-posts .entry-meta a {
     1512.ephemera .entry-meta a {
    15131513        color: #767676;
    15141514}
    1515 .post-formatted-posts .entry-meta a:hover {
     1515.ephemera .entry-meta a:hover {
    15161516        color: #2b2b2b;
    15171517}
    1518 .post-formatted-posts .entry-content p:not(.wp-caption-text) {
     1518.ephemera .entry-content p:not(.wp-caption-text) {
    15191519        font-size: 13px;
    15201520        font-size: 1.3rem;
    15211521        line-height: 1.3846153846;
    15221522        margin-bottom: 18px;
    15231523        margin-bottom: 1.8rem;
    15241524}
    1525 .post-formatted-posts .entry-content blockquote p cite {
     1525.ephemera .entry-content blockquote p cite {
    15261526        font-size: 13px;
    15271527        font-size: 1.3rem;
    15281528        line-height: 1.3846153846;
    15291529}
    1530 .post-formatted-posts .wp-caption {
     1530.ephemera .wp-caption {
    15311531        margin-bottom: 18px;
    15321532        margin-bottom: 1.8rem;
    15331533}
    1534 .post-formatted-posts .wp-caption-text {
     1534.ephemera .wp-caption-text {
    15351535        line-height: 1.5;
    15361536        margin: 6px 0 0;
    15371537        margin: 0.6rem 0 0;
    15381538        padding: 0;
    15391539}
    1540 .post-formatted-posts .format-gallery .wp-caption-text {
     1540.ephemera .format-gallery .wp-caption-text {
    15411541        margin-bottom: 18px;
    15421542        margin-bottom: 1.8rem;
    15431543}
    1544 .post-formatted-posts .more-link {
     1544.ephemera .more-link {
    15451545        font-size: 12px;
    15461546        font-size: 1.2rem;
    15471547        line-height: 1.5;
    15481548}
    1549 .post-formatted-posts .more-formatted-posts-link {
     1549.ephemera .post-format-archive-link {
    15501550        display: inline-block;
    15511551        font-size: 12px;
    15521552        font-size: 1.2rem;
     
    21062106        margin-left: 1px;
    21072107        margin-left: 0.1rem;
    21082108}
    2109 .widget div:last-child,
    21102109.widget table:last-child,
    21112110.widget iframe:last-child,
    21122111.widget p:last-child,
     
    25182517                padding: 3.6rem 1.0rem 2.4rem 0;
    25192518                width: 30.35714285%;
    25202519        }
    2521         .post-formatted-posts {
     2520        .ephemera {
    25222521                border: none;
    25232522                clear: none;
    25242523                float: right;
     
    28232822                margin: 0 27.31707317% 0 22.2rem;
    28242823        }
    28252824        .content-sidebar,
    2826         .post-formatted-posts {
     2825        .ephemera {
    28272826                margin: 0 0 0 -27.31707317%;
    28282827                width: 24.87804878%;
    28292828        }
     
    30553054                max-width: 126.0rem;
    30563055        }
    30573056        .content-sidebar,
    3058         .post-formatted-posts {
     3057        .ephemera {
    30593058                padding-right: 0;
    30603059        }
    30613060        .content-area .full-width .entry-header,
  • wp-content/themes/twentyfourteen/sidebar-content.php

     
    99<div id="content-sidebar" class="content-sidebar widget-area" role="complementary">
    1010        <?php do_action( 'before_sidebar' ); ?>
    1111
    12         <?php if ( ! dynamic_sidebar( 'sidebar-2' ) ) : ?>
     12        <?php if ( ! dynamic_sidebar( 'sidebar-3' ) ) : ?>
    1313                <aside id="search" class="widget widget_search">
    1414                                <?php get_search_form(); ?>
    1515                </aside>
  • wp-content/themes/twentyfourteen/sidebar-ephemera.php

     
     1<?php
     2/**
     3 * A template to display recent post formatted posts.
     4 *
     5 * @package WordPress
     6 * @subpackage Twenty_Fourteen
     7 */
     8?>
     9
     10<div id="ephemera" class="ephemera" role="complementary">
     11        <?php
     12                if ( ! dynamic_sidebar( 'sidebar-2' ) ) :
     13                        foreach ( array( 'video', 'image', 'gallery', 'aside', 'link', 'quote' ) as $format ) :
     14                                the_widget(
     15                                        'Twenty_Fourteen_Ephemera_Widget',
     16                                        array(
     17                                                'format' => $format,
     18                                        ),
     19                                        array(
     20                                                'before_widget' => '<aside class="widget widget_twentyfourteen_ephemera">',
     21                                                'after_widget'  => '</aside>',
     22                                        )
     23                                );
     24                        endforeach;
     25                endif;
     26        ?>
     27</div>