Ticket #25028: 25028.2.diff
File 25028.2.diff, 26.9 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
131 131 * @return void 132 132 */ 133 133 function 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 ) ); 134 146 register_sidebar( array( 135 'name' => __( 'PrimarySidebar', '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' ), 138 150 '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>', 142 154 ) ); 143 155 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' ), 147 159 '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>', 151 163 ) ); 152 164 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' ), 155 168 '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>', 159 172 ) ); 160 173 } 161 174 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 = 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
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
428 428 /* Animated elements */ 429 429 .site a, 430 430 .more-link .meta-nav, 431 . more-formatted-posts-link .meta-nav,431 .post-format-archive-link .meta-nav, 432 432 .attachment-featured-featured img, 433 433 .attachment-featured-thumbnail img, 434 434 .social-links-toggle, … … 1028 1028 .group-blog .byline { 1029 1029 display: inline; 1030 1030 } 1031 . post-formatted-posts.entry-title:after,1031 .ephemera .entry-title:after, 1032 1032 .content-area span + .entry-date:before, 1033 1033 span + .byline:before, 1034 1034 span + .comments-link:before, … … 1182 1182 text-transform: none; 1183 1183 } 1184 1184 .more-link, 1185 . more-formatted-posts-link {1185 .post-format-archive-link { 1186 1186 font-size: 14px; 1187 1187 font-size: 1.4rem; 1188 1188 text-transform: uppercase; 1189 1189 white-space: pre; 1190 1190 } 1191 1191 .more-link:hover, 1192 . more-formatted-posts-link:hover {1192 .post-format-archive-link:hover { 1193 1193 text-decoration: none; 1194 1194 } 1195 1195 .more-link .meta-nav, 1196 . more-formatted-posts-link .meta-nav {1196 .post-format-archive-link .meta-nav { 1197 1197 position: relative; 1198 1198 left: 0; 1199 1199 } 1200 1200 .more-link:hover .meta-nav, 1201 . more-formatted-posts-link:hover .meta-nav {1201 .post-format-archive-link:hover .meta-nav { 1202 1202 left: 5px; 1203 1203 left: 0.5rem; 1204 1204 } … … 1430 1430 /* =Post Formatted posts column 1431 1431 ----------------------------------------------- */ 1432 1432 1433 . post-formatted-posts{1433 .ephemera { 1434 1434 border-top: 1px solid rgba(0, 0, 0, 0.1); 1435 1435 border-bottom: 1px solid rgba(0, 0, 0, 0.1); 1436 1436 -moz-box-sizing: border-box; … … 1439 1439 padding: 23px 10px 0; 1440 1440 padding: 2.3rem 1.0rem 0; 1441 1441 } 1442 . post-formatted-posts .format-title {1442 .ephemera .widget-title { 1443 1443 border-top: 5px solid #000; 1444 1444 color: #2b2b2b; 1445 1445 font-size: 14px; … … 1451 1451 padding-top: 1px; 1452 1452 text-transform: uppercase; 1453 1453 } 1454 . post-formatted-posts.entry-content a {1454 .ephemera .entry-content a { 1455 1455 word-wrap: break-word; 1456 1456 } 1457 . format-title:before {1457 .ephemera .widget-title:before { 1458 1458 background-color: #000; 1459 1459 color: #fff; 1460 1460 margin-top: -1px; … … 1467 1467 width: 36px; 1468 1468 width: 3.6rem; 1469 1469 } 1470 . recent-videos .format-title:before {1470 .ephemera .video.widget-title:before { 1471 1471 content: '\F104'; 1472 1472 } 1473 . recent-images .format-title:before {1473 .ephemera .image.widget-title:before { 1474 1474 content: '\F102'; 1475 1475 } 1476 . recent-galleries .format-title:before {1476 .ephemera .gallery.widget-title:before { 1477 1477 content: '\F103'; 1478 1478 } 1479 . recent-asides .format-title:before {1479 .ephemera .aside.widget-title:before { 1480 1480 content: '\F101'; 1481 1481 } 1482 . recent-quotes .format-title:before {1482 .ephemera .quote.widget-title:before { 1483 1483 content: '\F106'; 1484 1484 } 1485 . recent-links .format-title:before {1485 .ephemera .link.widget-title:before { 1486 1486 content: '\F107'; 1487 1487 } 1488 . post-formatted-posts.hentry {1488 .ephemera .hentry { 1489 1489 border-bottom: 1px solid rgba(0, 0, 0, 0.1); 1490 1490 margin-bottom: 18px; 1491 1491 margin-bottom: 1.8rem; 1492 1492 } 1493 . post-formatted-posts.hentry:last-of-type {1493 .ephemera .hentry:last-of-type { 1494 1494 margin-bottom: 9px; 1495 1495 margin-bottom: 0.9rem; 1496 1496 } 1497 . post-formatted-posts.entry-title {1497 .ephemera .entry-title { 1498 1498 display: inline; 1499 1499 font-size: 12px; 1500 1500 font-size: 1.2rem; … … 1503 1503 margin: 0 0 6px 0; 1504 1504 margin: 0 0 0.6rem 0; 1505 1505 } 1506 . post-formatted-posts.entry-meta {1506 .ephemera .entry-meta { 1507 1507 color: rgba(0, 0, 0, 0.2); 1508 1508 line-height: 1.5; 1509 1509 margin-bottom: 18px; 1510 1510 margin-bottom: 1.8rem; 1511 1511 } 1512 . post-formatted-posts.entry-meta a {1512 .ephemera .entry-meta a { 1513 1513 color: #767676; 1514 1514 } 1515 . post-formatted-posts.entry-meta a:hover {1515 .ephemera .entry-meta a:hover { 1516 1516 color: #2b2b2b; 1517 1517 } 1518 . post-formatted-posts.entry-content p:not(.wp-caption-text) {1518 .ephemera .entry-content p:not(.wp-caption-text) { 1519 1519 font-size: 13px; 1520 1520 font-size: 1.3rem; 1521 1521 line-height: 1.3846153846; 1522 1522 margin-bottom: 18px; 1523 1523 margin-bottom: 1.8rem; 1524 1524 } 1525 . post-formatted-posts.entry-content blockquote p cite {1525 .ephemera .entry-content blockquote p cite { 1526 1526 font-size: 13px; 1527 1527 font-size: 1.3rem; 1528 1528 line-height: 1.3846153846; 1529 1529 } 1530 . post-formatted-posts.wp-caption {1530 .ephemera .wp-caption { 1531 1531 margin-bottom: 18px; 1532 1532 margin-bottom: 1.8rem; 1533 1533 } 1534 . post-formatted-posts.wp-caption-text {1534 .ephemera .wp-caption-text { 1535 1535 line-height: 1.5; 1536 1536 margin: 6px 0 0; 1537 1537 margin: 0.6rem 0 0; 1538 1538 padding: 0; 1539 1539 } 1540 . post-formatted-posts.format-gallery .wp-caption-text {1540 .ephemera .format-gallery .wp-caption-text { 1541 1541 margin-bottom: 18px; 1542 1542 margin-bottom: 1.8rem; 1543 1543 } 1544 . post-formatted-posts.more-link {1544 .ephemera .more-link { 1545 1545 font-size: 12px; 1546 1546 font-size: 1.2rem; 1547 1547 line-height: 1.5; 1548 1548 } 1549 . post-formatted-posts .more-formatted-posts-link {1549 .ephemera .post-format-archive-link { 1550 1550 display: inline-block; 1551 1551 font-size: 12px; 1552 1552 font-size: 1.2rem; … … 2106 2106 margin-left: 1px; 2107 2107 margin-left: 0.1rem; 2108 2108 } 2109 .widget div:last-child,2110 2109 .widget table:last-child, 2111 2110 .widget iframe:last-child, 2112 2111 .widget p:last-child, … … 2518 2517 padding: 3.6rem 1.0rem 2.4rem 0; 2519 2518 width: 30.35714285%; 2520 2519 } 2521 . post-formatted-posts{2520 .ephemera { 2522 2521 border: none; 2523 2522 clear: none; 2524 2523 float: right; … … 2823 2822 margin: 0 27.31707317% 0 22.2rem; 2824 2823 } 2825 2824 .content-sidebar, 2826 . post-formatted-posts{2825 .ephemera { 2827 2826 margin: 0 0 0 -27.31707317%; 2828 2827 width: 24.87804878%; 2829 2828 } … … 3055 3054 max-width: 126.0rem; 3056 3055 } 3057 3056 .content-sidebar, 3058 . post-formatted-posts{3057 .ephemera { 3059 3058 padding-right: 0; 3060 3059 } 3061 3060 .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>