Ticket #25031: 25031.5.diff
| File 25031.5.diff, 10.5 KB (added by , 13 years ago) |
|---|
-
wp-content/themes/twentyfourteen/functions.php
57 57 add_theme_support( 'post-thumbnails', array( 'post' ) ); 58 58 59 59 // Adding several sizes for Post Thumbnails. 60 add_image_size( 'featured-thumbnail-large', 672, 0 );60 add_image_size( 'featured-thumbnail-large', 1010, 0 ); 61 61 add_image_size( 'featured-thumbnail-featured', 672, 336, true ); 62 62 add_image_size( 'featured-thumbnail-formatted', 306, 0 ); 63 63 … … 99 99 * @return void 100 100 */ 101 101 function twentyfourteen_content_width() { 102 if ( is_page_template( 'full-width-page.php' ) || is_attachment() )102 if ( ( ! is_front_page() && ! is_active_sidebar( 'sidebar-3' ) ) || is_page_template( 'full-width-page.php' ) || is_attachment() ) 103 103 $GLOBALS['content_width'] = 895; 104 104 } 105 105 add_action( 'template_redirect', 'twentyfourteen_content_width' ); … … 122 122 123 123 $featured_posts = apply_filters( 'twentyfourteen_get_featured_posts', array() ); 124 124 125 return is_array( $featured_posts ) && count( $featured_posts ) > absint( $minimum );125 return is_array( $featured_posts ) && count( $featured_posts ) >= absint( $minimum ); 126 126 } 127 127 128 128 /** … … 410 410 * @return array The filtered body class list. 411 411 */ 412 412 function twentyfourteen_body_classes( $classes ) { 413 // Adds a class of group-blog to blogs with more than 1 published author 414 if ( is_multi_author() ) {413 // Adds a class of group-blog to blogs with more than 1 published author. 414 if ( is_multi_author() ) 415 415 $classes[] = 'group-blog'; 416 } 417 if ( is_archive() || is_search() || is_home() ) {416 417 if ( is_archive() || is_search() || is_home() ) 418 418 $classes[] = 'list-view'; 419 } 419 420 if ( ( ! is_front_page() && ! is_active_sidebar( 'sidebar-3' ) ) || is_page_template( 'full-width-page.php' ) ) 421 $classes[] = 'full-width'; 420 422 421 423 return $classes; 422 424 } -
wp-content/themes/twentyfourteen/featured-content.php
9 9 */ 10 10 ?> 11 11 12 <div class="featured-content-wrapper">13 <div id="featured-content" class="featured-content">14 12 15 <?php 16 do_action( 'twentyfourteen_featured_posts_before' ); 13 <div id="featured-content" class="featured-content"> 17 14 18 $featured_posts = twentyfourteen_get_featured_posts(); 19 foreach ( (array) $featured_posts as $order => $post ) : 20 setup_postdata( $post ); 15 <?php 16 do_action( 'twentyfourteen_featured_posts_before' ); 21 17 22 get_template_part( 'content', 'featured-post' ); 23 endforeach; 18 $featured_posts = twentyfourteen_get_featured_posts(); 19 foreach ( (array) $featured_posts as $order => $post ) : 20 setup_postdata( $post ); 24 21 25 do_action( 'twentyfourteen_featured_posts_after' ); 22 get_template_part( 'content', 'featured-post' ); 23 endforeach; 26 24 27 wp_reset_postdata(); 28 ?> 25 do_action( 'twentyfourteen_featured_posts_after' ); 29 26 30 </div><!-- .featured-content --> 31 </div><!-- .featured-content-wrapper --> 27 wp_reset_postdata(); 28 ?> 29 30 </div><!-- .featured-content --> -
wp-content/themes/twentyfourteen/front-page.php
6 6 * @subpackage Twenty_Fourteen 7 7 */ 8 8 9 get_header(); ?> 10 11 <div class="front-page-content-wrapper"> 12 <div class="front-page-content-main"> 13 14 <?php if ( twentyfourteen_has_featured_posts() ) : ?> 15 <?php get_template_part( 'featured-content' ); ?> 16 <?php endif; ?> 17 18 <div class="front-page-content-area"> 9 get_header(); 19 10 20 <div id="primary" class="content-area no-sidebar"> 21 <div id="content" class="site-content" role="main"> 22 <?php 23 if ( have_posts() ) : 24 while ( have_posts() ) : 25 the_post(); 11 if ( twentyfourteen_has_featured_posts() ) 12 get_template_part( 'featured-content' ); 26 13 27 get_template_part( 'content', get_post_format() ); 14 ?> 28 15 29 comments_template(); 30 endwhile; 31 twentyfourteen_paging_nav(); 16 <div id="primary" class="content-area"> 17 <div id="content" class="site-content" role="main"> 18 <?php 19 if ( have_posts() ) : 20 while ( have_posts() ) : 21 the_post(); 32 22 33 else : 34 get_template_part( 'no-results', 'index' ); 23 get_template_part( 'content', get_post_format() ); 35 24 36 endif; 37 ?> 38 </div><!-- #content .site-content --> 39 </div><!-- #primary .content-area --> 25 comments_template(); 26 endwhile; 27 twentyfourteen_paging_nav(); 40 28 41 <?php get_sidebar( 'ephemera' ); ?> 29 else : 30 get_template_part( 'no-results', 'index' ); 42 31 43 </div><!-- .front-page-content-area -->44 45 </div><!-- .front-page-content-main-->46 </div><!-- .front-page-content-wrapper-->32 endif; 33 ?> 34 </div><!-- #content --> 35 </div><!-- #primary --> 47 36 48 37 <?php 38 get_sidebar( 'ephemera' ); 49 39 get_sidebar(); 50 40 get_footer(); -
wp-content/themes/twentyfourteen/image.php
6 6 * @subpackage Twenty_Fourteen 7 7 */ 8 8 9 $metadata = wp_get_attachment_metadata(); 10 9 11 get_header(); 10 12 ?> 11 13 12 14 <section id="primary" class="content-area image-attachment"> 13 <div id="content" class="site-content full-width" role="main">15 <div id="content" class="site-content" role="main"> 14 16 15 17 <?php while ( have_posts() ) : the_post(); ?> 16 18 … … 19 21 <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?> 20 22 21 23 <div class="entry-meta"> 22 <?php $metadata = wp_get_attachment_metadata(); ?>23 24 24 <span class="entry-date"><time class="entry-date" datetime="<?php echo esc_attr( get_the_date( 'c' ) ); ?>"><?php echo esc_html( get_the_date() ); ?></time></span> 25 25 26 26 <span class="full-size-link"><a href="<?php echo wp_get_attachment_url(); ?>" title="Link to full-size image"><?php echo $metadata['width']; ?> × <?php echo $metadata['height']; ?></a></span> -
wp-content/themes/twentyfourteen/style.css
528 528 .site-main { 529 529 max-width: 1230px; 530 530 max-width: 123.0rem; 531 position: relative 531 532 } 532 533 .content-area { 533 534 padding-top:24px; … … 964 965 max-width: 672px; 965 966 max-width: 67.2rem; 966 967 } 968 .full-width .hentry { 969 max-width: inherit; 970 } 967 971 .attachment-featured-thumbnail { 968 972 background: #767676 url(images/pattern.png) repeat 0 0; 969 973 background-size: 5px 5px; … … 1487 1491 } 1488 1492 .ephemera .hentry { 1489 1493 border-bottom: 1px solid rgba(0, 0, 0, 0.1); 1494 border-top: 0; 1490 1495 margin-bottom: 18px; 1491 1496 margin-bottom: 1.8rem; 1492 1497 } … … 2505 2510 float: left; 2506 2511 padding: 36px 0; 2507 2512 padding: 3.6rem 0; 2513 position: relative; 2508 2514 width: 100%; 2509 2515 } 2510 2516 .site-content { 2511 2517 margin: 0 33.33333333% 0 0; 2512 2518 } 2513 .content-sidebar { 2514 float: right; 2515 margin: 0 0 0 -30.35714285%; 2516 padding: 36px 10px 24px 0; 2517 padding: 3.6rem 1.0rem 2.4rem 0; 2518 width: 30.35714285%; 2519 .full-width .site-content { 2520 margin: 0; 2519 2521 } 2522 .content-sidebar, 2520 2523 .ephemera { 2521 2524 border: none; 2522 clear: none;2523 float: right;2524 margin: 0 0 0 -30.35714285%;2525 padding: 36px 10px 00;2526 padding: 3.6rem 1.0rem 00;2525 padding: 36px 10px 24px 0; 2526 padding: 3.6rem 1rem 2.4rem 0; 2527 position: absolute; 2528 right: 0; 2529 top: 0; 2527 2530 width: 30.35714285%; 2528 2531 } 2529 2532 #featured-content .hentry { … … 2798 2801 #secondary { 2799 2802 background-color: transparent; 2800 2803 border-bottom: 0; 2801 clear: none;2802 2804 font-size: 1.1rem; 2803 float: left;2804 2805 line-height: 1.6363636363; 2805 margin: 0 0 0 -100%;2806 2806 padding: 0 27px; 2807 2807 padding: 0 2.7rem; 2808 position: absolute; 2809 top: 0; 2808 2810 width: 168px; 2809 2811 width: 16.8rem; 2810 2812 } … … 2821 2823 margin: 0 27.31707317% 0 222px; 2822 2824 margin: 0 27.31707317% 0 22.2rem; 2823 2825 } 2826 .full-width .site-content { 2827 margin: 0 0 0 222px; 2828 margin: 0 0 0 22.2rem; 2829 } 2824 2830 .content-sidebar, 2825 2831 .ephemera { 2826 margin: 0 0 0 -27.31707317%;2827 2832 width: 24.87804878%; 2828 2833 } 2829 2834 .content-area .entry-header, … … 3053 3058 max-width: 1260px; 3054 3059 max-width: 126.0rem; 3055 3060 } 3056 .content-sidebar,3057 .ephemera {3058 padding-right: 0;3059 }3060 3061 .content-area .full-width .entry-header, 3061 3062 .content-area .full-width .entry-content, 3062 3063 .content-area .full-width .page-content, -
wp-content/themes/twentyfourteen/full-width-page.php
9 9 get_header(); ?> 10 10 11 11 <div id="primary" class="content-area"> 12 <div id="content" class="site-content full-width" role="main">12 <div id="content" class="site-content" role="main"> 13 13 <?php 14 14 while ( have_posts() ) : 15 15 the_post(); -
wp-content/themes/twentyfourteen/sidebar-content.php
5 5 * @package WordPress 6 6 * @subpackage Twenty_Fourteen 7 7 */ 8 ?>9 <div id="content-sidebar" class="content-sidebar widget-area" role="complementary">10 <?php do_action( 'before_sidebar' ); ?>11 8 12 <?php if ( ! dynamic_sidebar( 'sidebar-3' ) ) : ?> 13 <aside id="search" class="widget widget_search"> 14 <?php get_search_form(); ?> 15 </aside> 16 17 <aside id="link" class="widget widget_links"> 18 <h1 class="widget-title"><?php _e( 'Blogroll', 'twentyfourteen' ); ?></h1> 19 <ul class="xoxo blogroll"> 20 <?php wp_list_bookmarks( array( 'title_li' => '', 'categorize' => 0 ) ); ?> 21 </ul> 22 </aside> 9 if ( ! is_active_sidebar( 'sidebar-3' ) ) 10 return; 11 ?> 23 12 24 <aside id="meta" class="widget"> 25 <h1 class="widget-title"><?php _e( 'Meta', 'twentyfourteen' ); ?></h1> 26 <ul> 27 <?php wp_register(); ?> 28 <li><?php wp_loginout(); ?></li> 29 <?php wp_meta(); ?> 30 </ul> 31 </aside> 32 <?php endif; // end sidebar widget area ?> 13 <div id="content-sidebar" class="content-sidebar widget-area" role="complementary"> 14 <?php dynamic_sidebar( 'sidebar-3' ); ?> 33 15 </div><!-- #content-sidebar -->