Ticket #25028: 25028.1.diff
File 25028.1.diff, 27.2 KB (added by , 12 years ago) |
---|
-
wp-content/themes/twentyfourteen/sidebar-footer.php
5 5 * @package WordPress 6 6 * @subpackage Twenty_Fourteen 7 7 */ 8 ?> 9 <?php 10 if ( ! is_active_sidebar( 'sidebar-3' ) ) 8 9 if ( ! is_active_sidebar( 'sidebar-4' ) ) 11 10 return; 12 11 ?> 13 <div id="supplementary">14 12 15 <?php if ( is_active_sidebar( 'sidebar-3' ) ) : ?>13 <div id="supplementary"> 16 14 <div id="footer-sidebar" class="widget-area" role="complementary"> 17 <?php dynamic_sidebar( 'sidebar- 3' ); ?>15 <?php dynamic_sidebar( 'sidebar-4' ); ?> 18 16 </div><!-- #footer-sidebar --> 19 <?php endif; ?>20 21 17 </div><!-- #supplementary --> -
wp-content/themes/twentyfourteen/functions.php
123 123 * @return void 124 124 */ 125 125 function twentyfourteen_widgets_init() { 126 require get_template_directory() . '/inc/widgets.php'; 127 register_widget( 'Twenty_Fourteen_Ephemera_Widget' ); 128 129 register_sidebar( array( 130 'name' => __( 'Primary Sidebar', 'twentyfourteen' ), 131 'id' => 'sidebar-1', 132 'description' => __( 'Main sidebar that appears on the left.', 'twentyfourteen' ), 133 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 134 'after_widget' => '</aside>', 135 'before_title' => '<h1 class="widget-title">', 136 'after_title' => '</h1>', 137 ) ); 126 138 register_sidebar( array( 127 'name' => __( 'PrimarySidebar', 'twentyfourteen' ),128 'id' => 'sidebar-1',129 'description' => __( 'Main sidebar that appears on the left.', 'twentyfourteen' ),139 'name' => __( 'Front Page Sidebar', 'twentyfourteen' ), 140 'id' => 'sidebar-2', 141 'description' => __( 'Additional sidebar that appears on the right, on the home page.', 'twentyfourteen' ), 130 142 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 131 'after_widget' => '</aside>',132 'before_title' => '<h1 class="widget-title">',133 'after_title' => '</h1>',143 'after_widget' => '</aside>', 144 'before_title' => '<h1 class="widget-title">', 145 'after_title' => '</h1>', 134 146 ) ); 135 147 register_sidebar( array( 136 'name' => __( 'Content Sidebar', 'twentyfourteen' ),137 'id' => 'sidebar-2',138 'description' => __( 'Additional sidebar that appears on the right, on single posts and pages.', 'twentyfourteen' ),148 'name' => __( 'Content Sidebar', 'twentyfourteen' ), 149 'id' => 'sidebar-3', 150 'description' => __( 'Additional sidebar that appears on the right, on single posts and pages.', 'twentyfourteen' ), 139 151 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 140 'after_widget' => '</aside>',141 'before_title' => '<h1 class="widget-title">',142 'after_title' => '</h1>',152 'after_widget' => '</aside>', 153 'before_title' => '<h1 class="widget-title">', 154 'after_title' => '</h1>', 143 155 ) ); 144 156 register_sidebar( array( 145 'name' => __( 'Footer Widget Area', 'twentyfourteen' ), 146 'id' => 'sidebar-3', 157 'name' => __( 'Footer Widget Area', 'twentyfourteen' ), 158 'id' => 'sidebar-4', 159 'description' => __( 'Appears in the footer section of the site.', 'twentyfourteen' ), 147 160 '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>',161 'after_widget' => '</aside>', 162 'before_title' => '<h1 class="widget-title">', 163 'after_title' => '</h1>', 151 164 ) ); 152 165 } 153 166 add_action( 'widgets_init', 'twentyfourteen_widgets_init' ); -
wp-content/themes/twentyfourteen/rtl.css
219 219 /* =Post Formatted posts column 220 220 ----------------------------------------------- */ 221 221 222 . format-title:before {222 .ephemera .widget-title:before { 223 223 margin-left: 10px; 224 224 margin-left: 1.0rem; 225 225 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 12 class 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">→</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">→</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 = 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 $this->get_field_id( 'number' ); ?>"><?php _e( 'Number of posts to show:', 'twentyfourteen' ); ?></label> 238 <input id="<?php echo $this->get_field_id( 'number' ); ?>" name="<?php echo $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
Property changes on: wp-content/themes/twentyfourteen/inc/widgets.php ___________________________________________________________________ Added: svn:eol-style + native
38 38 </div><!-- #content .site-content --> 39 39 </div><!-- #primary .content-area --> 40 40 41 <?php get_ template_part( 'recent-formatted-posts' ); ?>41 <?php get_sidebar( 'ephemera' ); ?> 42 42 43 43 </div><!-- .front-page-content-area --> 44 44 -
wp-content/themes/twentyfourteen/recent-formatted-posts.php
1 <?php2 /**3 * A template to display recent post formatted posts.4 *5 * @package WordPress6 * @subpackage Twenty_Fourteen7 */8 ?>9 10 <div class="post-formatted-posts">11 <?php12 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 <?php22 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">→</span>', 'twentyfourteen' ); ?></a>27 </section>28 <?php endif; ?>29 30 <?php31 $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 <?php39 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">→</span>', 'twentyfourteen' ); ?></a>44 </section>45 <?php endif; ?>46 47 <?php48 $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 <?php56 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">→</span>', 'twentyfourteen' ); ?></a>61 </section>62 <?php endif; ?>63 64 <?php65 $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 <?php73 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">→</span>', 'twentyfourteen' ); ?></a>78 </section>79 <?php endif; ?>80 81 <?php82 $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 <?php90 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">→</span>', 'twentyfourteen' ); ?></a>95 </section>96 <?php endif; ?>97 98 <?php99 $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 <?php107 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">→</span>', 'twentyfourteen' ); ?></a>112 </section>113 <?php endif; ?>114 115 <?php116 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
424 424 /* Animated elements */ 425 425 .site a, 426 426 .more-link .meta-nav, 427 . more-formatted-posts-link .meta-nav,427 .post-format-archive-link .meta-nav, 428 428 .attachment-featured-featured img, 429 429 .attachment-featured-thumbnail img, 430 430 .social-links-toggle, … … 1024 1024 .group-blog .byline { 1025 1025 display: inline; 1026 1026 } 1027 . post-formatted-posts.entry-title:after,1027 .ephemera .entry-title:after, 1028 1028 .content-area span + span.entry-date:before, 1029 1029 span + .byline:before, 1030 1030 span + .comments-link:before, … … 1183 1183 text-transform: none; 1184 1184 } 1185 1185 .more-link, 1186 . more-formatted-posts-link {1186 .post-format-archive-link { 1187 1187 font-size: 14px; 1188 1188 font-size: 1.4rem; 1189 1189 text-transform: uppercase; 1190 1190 white-space: pre; 1191 1191 } 1192 1192 .more-link:hover, 1193 . more-formatted-posts-link:hover {1193 .post-format-archive-link:hover { 1194 1194 text-decoration: none; 1195 1195 } 1196 1196 .more-link .meta-nav, 1197 . more-formatted-posts-link .meta-nav {1197 .post-format-archive-link .meta-nav { 1198 1198 position: relative; 1199 1199 left: 0; 1200 1200 } 1201 1201 .more-link:hover .meta-nav, 1202 . more-formatted-posts-link:hover .meta-nav {1202 .post-format-archive-link:hover .meta-nav { 1203 1203 left: 5px; 1204 1204 left: 0.5rem; 1205 1205 } … … 1431 1431 /* =Post Formatted posts column 1432 1432 ----------------------------------------------- */ 1433 1433 1434 . post-formatted-posts{1434 .ephemera { 1435 1435 border-top: 1px solid rgba(0, 0, 0, 0.1); 1436 1436 border-bottom: 1px solid rgba(0, 0, 0, 0.1); 1437 1437 -moz-box-sizing: border-box; … … 1440 1440 padding: 23px 10px 0; 1441 1441 padding: 2.3rem 1.0rem 0; 1442 1442 } 1443 . post-formatted-posts .format-title {1443 .ephemera .widget-title { 1444 1444 border-top: 5px solid #000; 1445 1445 color: #2b2b2b; 1446 1446 font-size: 14px; … … 1452 1452 padding-top: 1px; 1453 1453 text-transform: uppercase; 1454 1454 } 1455 . post-formatted-posts.entry-content a {1455 .ephemera .entry-content a { 1456 1456 word-wrap: break-word; 1457 1457 } 1458 . format-title:before {1458 .ephemera .widget-title:before { 1459 1459 background-color: #000; 1460 1460 color: #fff; 1461 1461 margin-top: -1px; … … 1468 1468 width: 36px; 1469 1469 width: 3.6rem; 1470 1470 } 1471 . recent-videos .format-title:before {1471 .ephemera .video.widget-title:before { 1472 1472 content: '\F104'; 1473 1473 } 1474 . recent-images .format-title:before {1474 .ephemera .image.widget-title:before { 1475 1475 content: '\F102'; 1476 1476 } 1477 . recent-galleries .format-title:before {1477 .ephemera .gallery.widget-title:before { 1478 1478 content: '\F103'; 1479 1479 } 1480 . recent-asides .format-title:before {1480 .ephemera .aside.widget-title:before { 1481 1481 content: '\F101'; 1482 1482 } 1483 . recent-quotes .format-title:before {1483 .ephemera .quote.widget-title:before { 1484 1484 content: '\F106'; 1485 1485 } 1486 . recent-links .format-title:before {1486 .ephemera .link.widget-title:before { 1487 1487 content: '\F107'; 1488 1488 } 1489 . post-formatted-posts.hentry {1489 .ephemera .hentry { 1490 1490 border-bottom: 1px solid rgba(0, 0, 0, 0.1); 1491 1491 margin-bottom: 18px; 1492 1492 margin-bottom: 1.8rem; 1493 1493 } 1494 . post-formatted-posts.hentry:last-of-type {1494 .ephemera .hentry:last-of-type { 1495 1495 margin-bottom: 9px; 1496 1496 margin-bottom: 0.9rem; 1497 1497 } 1498 . post-formatted-posts.entry-title {1498 .ephemera .entry-title { 1499 1499 display: inline; 1500 1500 font-size: 12px; 1501 1501 font-size: 1.2rem; … … 1504 1504 margin: 0 0 6px 0; 1505 1505 margin: 0 0 0.6rem 0; 1506 1506 } 1507 . post-formatted-posts.entry-meta {1507 .ephemera .entry-meta { 1508 1508 color: rgba(0, 0, 0, 0.2); 1509 1509 line-height: 1.5; 1510 1510 margin-bottom: 18px; 1511 1511 margin-bottom: 1.8rem; 1512 1512 } 1513 . post-formatted-posts.entry-meta a {1513 .ephemera .entry-meta a { 1514 1514 color: #767676; 1515 1515 } 1516 . post-formatted-posts.entry-meta a:hover {1516 .ephemera .entry-meta a:hover { 1517 1517 color: #2b2b2b; 1518 1518 } 1519 . post-formatted-posts.entry-content p:not(.wp-caption-text) {1519 .ephemera .entry-content p:not(.wp-caption-text) { 1520 1520 font-size: 13px; 1521 1521 font-size: 1.3rem; 1522 1522 line-height: 1.3846153846; 1523 1523 margin-bottom: 18px; 1524 1524 margin-bottom: 1.8rem; 1525 1525 } 1526 . post-formatted-posts.entry-content blockquote p cite {1526 .ephemera .entry-content blockquote p cite { 1527 1527 font-size: 13px; 1528 1528 font-size: 1.3rem; 1529 1529 line-height: 1.3846153846; 1530 1530 } 1531 . post-formatted-posts.wp-caption {1531 .ephemera .wp-caption { 1532 1532 margin-bottom: 18px; 1533 1533 margin-bottom: 1.8rem; 1534 1534 } 1535 . post-formatted-posts.wp-caption-text {1535 .ephemera .wp-caption-text { 1536 1536 line-height: 1.5; 1537 1537 margin: 6px 0 0; 1538 1538 margin: 0.6rem 0 0; 1539 1539 padding: 0; 1540 1540 } 1541 . post-formatted-posts.format-gallery .wp-caption-text {1541 .ephemera .format-gallery .wp-caption-text { 1542 1542 margin-bottom: 18px; 1543 1543 margin-bottom: 1.8rem; 1544 1544 } 1545 . post-formatted-posts.more-link {1545 .ephemera .more-link { 1546 1546 font-size: 12px; 1547 1547 font-size: 1.2rem; 1548 1548 line-height: 1.5; 1549 1549 } 1550 . post-formatted-posts .more-formatted-posts-link {1550 .ephemera .post-format-archive-link { 1551 1551 display: inline-block; 1552 1552 font-size: 12px; 1553 1553 font-size: 1.2rem; … … 2108 2108 margin-left: 1px; 2109 2109 margin-left: 0.1rem; 2110 2110 } 2111 .widget div:last-child,2112 2111 .widget table:last-child, 2113 2112 .widget iframe:last-child, 2114 2113 .widget p:last-child, … … 2519 2518 padding: 3.6rem 1.0rem 2.4rem 0; 2520 2519 width: 30.35714285%; 2521 2520 } 2522 . post-formatted-posts{2521 .ephemera { 2523 2522 border: none; 2524 2523 clear: none; 2525 2524 float: right; … … 2828 2827 margin: 0 27.31707317% 0 22.2rem; 2829 2828 } 2830 2829 .content-sidebar, 2831 . post-formatted-posts{2830 .ephemera { 2832 2831 margin: 0 0 0 -27.31707317%; 2833 2832 width: 24.87804878%; 2834 2833 } … … 3060 3059 max-width: 126.0rem; 3061 3060 } 3062 3061 .content-sidebar, 3063 . post-formatted-posts{3062 .ephemera { 3064 3063 padding-right: 0; 3065 3064 } 3066 3065 .content-area .full-width .entry-header, -
wp-content/themes/twentyfourteen/sidebar-content.php
9 9 <div id="content-sidebar" class="content-sidebar widget-area" role="complementary"> 10 10 <?php do_action( 'before_sidebar' ); ?> 11 11 12 <?php if ( ! dynamic_sidebar( 'sidebar- 2' ) ) : ?>12 <?php if ( ! dynamic_sidebar( 'sidebar-3' ) ) : ?> 13 13 <aside id="search" class="widget widget_search"> 14 14 <?php get_search_form(); ?> 15 15 </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>