Ticket #26093: 26093.patch
File 26093.patch, 23.7 KB (added by , 11 years ago) |
---|
-
content-aside.php
54 54 </div><!-- .entry-content --> 55 55 56 56 <?php 57 if ( has_tag() ) 57 if ( has_tag() ) { 58 58 echo get_the_tag_list( '<footer class="entry-meta"><span class="tag-links">', '', '</span></footer>' ); 59 } 59 60 ?> 60 61 </article><!-- #post-## --> -
content-audio.php
54 54 </div><!-- .entry-content --> 55 55 56 56 <?php 57 if ( has_tag() ) 57 if ( has_tag() ) { 58 58 echo get_the_tag_list( '<footer class="entry-meta"><span class="tag-links">', '', '</span></footer>' ); 59 } 59 60 ?> 60 61 </article><!-- #post-## --> -
content-featured-post.php
12 12 <a class="post-thumbnail" href="<?php the_permalink(); ?>" rel="<?php the_ID(); ?>"> 13 13 <?php 14 14 if ( has_post_thumbnail() ) : 15 if ( 'grid' == get_theme_mod( 'featured_content_layout' ) ) 15 if ( 'grid' == get_theme_mod( 'featured_content_layout' ) ) { 16 16 the_post_thumbnail(); 17 else17 } else { 18 18 the_post_thumbnail( 'twentyfourteen-full-width' ); 19 } 19 20 endif; 20 21 ?> 21 22 </a> -
content-gallery.php
54 54 </div><!-- .entry-content --> 55 55 56 56 <?php 57 if ( has_tag() ) 57 if ( has_tag() ) { 58 58 echo get_the_tag_list( '<footer class="entry-meta"><span class="tag-links">', '', '</span></footer>' ); 59 } 59 60 ?> 60 61 </article><!-- #post-## --> -
content-image.php
54 54 </div><!-- .entry-content --> 55 55 56 56 <?php 57 if ( has_tag() ) 58 echo get_the_tag_list( '<footer class="entry-meta"><span class="tag-links">', '', '</span></footer>' ); 57 if ( has_tag() ) { 58 echo get_the_tag_list( '<footer class="entry-meta"><span class="tag-links">', '', '</span></footer>' ); 59 } 59 60 ?> 60 61 </article><!-- #post-## --> -
content-link.php
54 54 </div><!-- .entry-content --> 55 55 56 56 <?php 57 if ( has_tag() ) 58 echo get_the_tag_list( '<footer class="entry-meta"><span class="tag-links">', '', '</span></footer>' ); 57 if ( has_tag() ) { 58 echo get_the_tag_list( '<footer class="entry-meta"><span class="tag-links">', '', '</span></footer>' ); 59 } 59 60 ?> 60 61 </article><!-- #post-## --> -
content-quote.php
54 54 </div><!-- .entry-content --> 55 55 56 56 <?php 57 if ( has_tag() ) 58 echo get_the_tag_list( '<footer class="entry-meta"><span class="tag-links">', '', '</span></footer>' ); 57 if ( has_tag() ) { 58 echo get_the_tag_list( '<footer class="entry-meta"><span class="tag-links">', '', '</span></footer>' ); 59 } 59 60 ?> 60 61 </article><!-- #post-## --> -
content-video.php
54 54 </div><!-- .entry-content --> 55 55 56 56 <?php 57 if ( has_tag() ) 58 echo get_the_tag_list( '<footer class="entry-meta"><span class="tag-links">', '', '</span></footer>' ); 57 if ( has_tag() ) { 58 echo get_the_tag_list( '<footer class="entry-meta"><span class="tag-links">', '', '</span></footer>' ); 59 } 59 60 ?> 60 61 </article><!-- #post-## --> -
content.php
63 63 <?php endif; ?> 64 64 65 65 <?php 66 if ( has_tag() ) 67 echo get_the_tag_list( '<footer class="entry-meta"><span class="tag-links">', '', '</span></footer>' ); 66 if ( has_tag() ) { 67 echo get_the_tag_list( '<footer class="entry-meta"><span class="tag-links">', '', '</span></footer>' ); 68 } 68 69 ?> 69 70 </article><!-- #post-## --> -
functions.php
31 31 * 32 32 * @since Twenty Fourteen 1.0 33 33 */ 34 if ( ! isset( $content_width ) ) 34 if ( ! isset( $content_width ) ) { 35 35 $content_width = 474; 36 } 36 37 37 38 /** 38 39 * Twenty Fourteen only works in WordPress 3.6 or later. 39 40 */ 40 if ( version_compare( $GLOBALS['wp_version'], '3.6', '<' ) ) 41 if ( version_compare( $GLOBALS['wp_version'], '3.6', '<' ) ) { 41 42 require get_template_directory() . '/inc/back-compat.php'; 43 } 42 44 43 45 if ( ! function_exists( 'twentyfourteen_setup' ) ) : 44 46 /** … … 203 205 * Translators: If there are characters in your language that are not supported 204 206 * by Lato, translate this to 'off'. Do not translate into your own language. 205 207 */ 206 if ( 'off' !== _x( 'on', 'Lato font: on or off', 'twentyfourteen' ) ) 208 if ( 'off' !== _x( 'on', 'Lato font: on or off', 'twentyfourteen' ) ) { 207 209 $font_url = add_query_arg( 'family', urlencode( 'Lato:300,400,700,900,300italic,400italic,700italic' ), "//fonts.googleapis.com/css" ); 210 } 208 211 209 212 return $font_url; 210 213 } … … 230 233 wp_enqueue_style( 'twentyfourteen-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentyfourteen-style' ), '20131110' ); 231 234 wp_style_add_data( 'twentyfourteen-ie', 'conditional', 'lt IE 9' ); 232 235 233 if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) 236 if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { 234 237 wp_enqueue_script( 'comment-reply' ); 238 } 235 239 236 if ( is_singular() && wp_attachment_is_image() ) 240 if ( is_singular() && wp_attachment_is_image() ) { 237 241 wp_enqueue_script( 'twentyfourteen-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20130402' ); 238 239 if ( is_active_sidebar( 'sidebar-3' ) ) 242 } 243 244 if ( is_active_sidebar( 'sidebar-3' ) ) { 240 245 wp_enqueue_script( 'jquery-masonry' ); 246 } 241 247 242 248 if ( is_front_page() && 'slider' == get_theme_mod( 'featured_content_layout' ) ) { 243 249 wp_enqueue_script( 'twentyfourteen-slider', get_template_directory_uri() . '/js/slider.js', array( 'jquery' ), '20131109', true ); … … 303 309 } 304 310 305 311 // get the URL of the next image attachment... 306 if ( $next_id ) 312 if ( $next_id ) { 307 313 $next_attachment_url = get_attachment_link( $next_id ); 314 } 308 315 309 316 // or get the URL of the first image attachment. 310 else 317 else { 311 318 $next_attachment_url = get_attachment_link( array_shift( $attachment_ids ) ); 319 } 312 320 } 313 321 314 322 printf( '<a href="%1$s" rel="attachment">%2$s</a>', … … 337 345 $post_count = count_user_posts( $contributor_id ); 338 346 339 347 // Move on if user has not published a post (yet). 340 if ( ! $post_count ) 348 if ( ! $post_count ) { 341 349 continue; 350 } 342 351 ?> 343 352 344 353 <div class="contributor"> … … 379 388 * @return array The filtered body class list. 380 389 */ 381 390 function twentyfourteen_body_classes( $classes ) { 382 if ( is_multi_author() ) 391 if ( is_multi_author() ) { 383 392 $classes[] = 'group-blog'; 393 } 384 394 385 if ( get_header_image() ) 395 if ( get_header_image() ) { 386 396 $classes[] = 'header-image'; 387 else397 } else { 388 398 $classes[] = 'masthead-fixed'; 399 } 389 400 390 if ( is_archive() || is_search() || is_home() ) 401 if ( is_archive() || is_search() || is_home() ) { 391 402 $classes[] = 'list-view'; 403 } 392 404 393 405 if ( ( ! is_active_sidebar( 'sidebar-2' ) ) 394 406 || is_page_template( 'page-templates/full-width.php' ) 395 407 || is_page_template( 'page-templates/contributors.php' ) 396 || is_attachment() ) 408 || is_attachment() ) { 397 409 $classes[] = 'full-width'; 410 } 398 411 399 if ( is_active_sidebar( 'sidebar-3' ) ) 412 if ( is_active_sidebar( 'sidebar-3' ) ) { 400 413 $classes[] = 'footer-widgets'; 414 } 401 415 402 if ( is_singular() ) 416 if ( is_singular() ) { 403 417 $classes[] = 'singular'; 418 } 404 419 405 if ( is_front_page() && 'slider' == get_theme_mod( 'featured_content_layout' ) ) 420 if ( is_front_page() && 'slider' == get_theme_mod( 'featured_content_layout' ) ) { 406 421 $classes[] = 'slider'; 407 elseif ( is_front_page() )422 } elseif ( is_front_page() ) { 408 423 $classes[] = 'grid'; 424 } 409 425 410 426 return $classes; 411 427 } … … 423 439 * @return array The filtered post class list. 424 440 */ 425 441 function twentyfourteen_post_classes( $classes ) { 426 if ( ! post_password_required() && has_post_thumbnail() ) 442 if ( ! post_password_required() && has_post_thumbnail() ) { 427 443 $classes[] = 'has-post-thumbnail'; 444 } 428 445 429 446 return $classes; 430 447 } … … 443 460 function twentyfourteen_wp_title( $title, $sep ) { 444 461 global $paged, $page; 445 462 446 if ( is_feed() ) 463 if ( is_feed() ) { 447 464 return $title; 465 } 448 466 449 467 // Add the site name. 450 468 $title .= get_bloginfo( 'name' ); 451 469 452 470 // Add the site description for the home/front page. 453 471 $site_description = get_bloginfo( 'description', 'display' ); 454 if ( $site_description && ( is_home() || is_front_page() ) ) 472 if ( $site_description && ( is_home() || is_front_page() ) ) { 455 473 $title = "$title $sep $site_description"; 474 } 456 475 457 476 // Add a page number if necessary. 458 if ( $paged >= 2 || $page >= 2 ) 459 $title = "$title $sep " . sprintf( __( 'Page %s', 'twentyfourteen' ), max( $paged, $page ) ); 477 if ( $paged >= 2 || $page >= 2 ) { 478 $title = "$title $sep " . sprintf( __( 'Page %s', 'twentyfourteen' ), max( $paged, $page ) ); 479 } 460 480 461 481 return $title; 462 482 } … … 477 497 * To overwrite in a plugin, define your own Featured_Content class on or 478 498 * before the 'setup_theme' hook. 479 499 */ 480 if ( ! class_exists( 'Featured_Content' ) && 'plugins.php' !== $GLOBALS['pagenow'] ) 500 if ( ! class_exists( 'Featured_Content' ) && 'plugins.php' !== $GLOBALS['pagenow'] ) { 481 501 require get_template_directory() . '/inc/featured-content.php'; 502 } 503 No newline at end of file -
inc/featured-content.php
46 46 $theme_support = get_theme_support( 'featured-content' ); 47 47 48 48 // Return early if theme does not support Featured Content. 49 if ( ! $theme_support ) 49 if ( ! $theme_support ) { 50 50 return; 51 } 51 52 52 53 /* 53 54 * An array of named arguments must be passed as the second parameter 54 55 * of add_theme_support(). 55 56 */ 56 if ( ! isset( $theme_support[0] ) ) 57 if ( ! isset( $theme_support[0] ) ) { 57 58 return; 59 } 58 60 59 61 // Return early if "featured_content_filter" has not been defined. 60 if ( ! isset( $theme_support[0]['featured_content_filter'] ) ) 62 if ( ! isset( $theme_support[0]['featured_content_filter'] ) ) { 61 63 return; 64 } 62 65 63 66 $filter = $theme_support[0]['featured_content_filter']; 64 67 65 68 // Theme can override the number of max posts. 66 if ( isset( $theme_support[0]['max_posts'] ) ) 69 if ( isset( $theme_support[0]['max_posts'] ) ) { 67 70 self::$max_posts = absint( $theme_support[0]['max_posts'] ); 71 } 68 72 69 73 add_filter( $filter, array( __CLASS__, 'get_featured_posts' ) ); 70 74 add_action( 'customize_register', array( __CLASS__, 'customize_register' ), 9 ); … … 100 104 $post_ids = self::get_featured_post_ids(); 101 105 102 106 // No need to query if there is are no featured posts. 103 if ( empty( $post_ids ) ) 107 if ( empty( $post_ids ) ) { 104 108 return array(); 109 } 105 110 106 111 $featured_posts = get_posts( array( 107 112 'include' => $post_ids, … … 124 129 public static function get_featured_post_ids() { 125 130 // Return array of cached results if they exist. 126 131 $featured_ids = get_transient( 'featured_content_ids' ); 127 if ( ! empty( $featured_ids ) ) 132 if ( ! empty( $featured_ids ) ) { 128 133 return array_map( 'absint', (array) $featured_ids ); 134 } 129 135 130 136 $settings = self::get_setting(); 131 137 132 138 // Return sticky post ids if no tag name is set. 133 139 $term = get_term_by( 'name', $settings['tag-name'], 'post_tag' ); 134 if ( $term ) 140 if ( $term ) { 135 141 $tag = $term->term_id; 136 else 137 return self::get_sticky_posts(); 142 } else { 143 return self::get_sticky_posts(); 144 } 138 145 139 146 // Query for featured posts. 140 147 $featured = get_posts( array( … … 149 156 ) ); 150 157 151 158 // Return array with sticky posts if no Featured Content exists. 152 if ( ! $featured ) 159 if ( ! $featured ) { 153 160 return self::get_sticky_posts(); 161 } 154 162 155 163 // Ensure correct format before save/return. 156 164 $featured_ids = wp_list_pluck( (array) $featured, 'ID' ); … … 195 203 public static function pre_get_posts( $query = false ) { 196 204 197 205 // Bail if not home, not a query, not main query. 198 if ( ! is_a( $query, 'WP_Query' ) || ! $query->is_main_query() || ! is_home() ) 206 if ( ! is_a( $query, 'WP_Query' ) || ! $query->is_main_query() || ! is_home() ) { 199 207 return; 208 } 200 209 201 210 $page_on_front = get_option( 'page_on_front' ); 202 211 203 212 // Bail if the blog page is not the front page. 204 if ( ! empty( $page_on_front ) ) 213 if ( ! empty( $page_on_front ) ) { 205 214 return; 215 } 206 216 207 217 $featured = self::get_featured_post_ids(); 208 218 209 219 // Bail if no featured posts. 210 if ( ! $featured ) 211 return; 220 if ( ! $featured ) { 221 return; 222 } 212 223 213 224 // We need to respect post ids already in the blacklist. 214 225 $post__not_in = $query->get( 'post__not_in' ); … … 237 248 public static function delete_post_tag( $tag_id ) { 238 249 $settings = self::get_setting(); 239 250 240 if ( empty( $settings['tag-id'] ) || $tag_id != $settings['tag-id'] ) 251 if ( empty( $settings['tag-id'] ) || $tag_id != $settings['tag-id'] ) { 241 252 return; 253 } 242 254 243 255 $settings['tag-id'] = 0; 244 256 $settings = self::validate_settings( $settings ); … … 259 271 public static function hide_featured_term( $terms, $taxonomies ) { 260 272 261 273 // This filter is only appropriate on the front-end. 262 if ( is_admin() ) 274 if ( is_admin() ) { 263 275 return $terms; 276 } 264 277 265 278 // We only want to hide the featured tag. 266 if ( ! in_array( 'post_tag', $taxonomies ) ) 279 if ( ! in_array( 'post_tag', $taxonomies ) ) { 267 280 return $terms; 281 } 268 282 269 283 // Bail if no terms were returned. 270 if ( empty( $terms ) ) 284 if ( empty( $terms ) ) { 271 285 return $terms; 286 } 272 287 273 288 foreach( $terms as $order => $term ) { 274 if ( self::get_setting( 'tag-id' ) == $term->term_id && 'post_tag' == $term->taxonomy ) 289 if ( self::get_setting( 'tag-id' ) == $term->term_id && 'post_tag' == $term->taxonomy ) { 275 290 unset( $terms[ $order ] ); 291 } 276 292 } 277 293 278 294 return $terms; … … 293 309 public static function hide_the_featured_term( $terms, $id, $taxonomy ) { 294 310 295 311 // This filter is only appropriate on the front-end. 296 if ( is_admin() ) 312 if ( is_admin() ) { 297 313 return $terms; 314 } 298 315 299 316 // Make sure we are in the correct taxonomy. 300 if ( 'post_tag' != $taxonomy ) 317 if ( 'post_tag' != $taxonomy ) { 301 318 return $terms; 319 } 302 320 303 321 // No terms? Return early! 304 if ( empty( $terms ) ) 322 if ( empty( $terms ) ) { 305 323 return $terms; 324 } 306 325 307 326 foreach( $terms as $order => $term ) { 308 if ( self::get_setting( 'tag-id' ) == $term->term_id ) 327 if ( self::get_setting( 'tag-id' ) == $term->term_id ) { 309 328 unset( $terms[ $term->term_id ] ); 329 } 310 330 } 311 331 312 332 return $terms; … … 401 421 $options = array_intersect_key( $options, $defaults ); 402 422 $options['quantity'] = self::sanitize_quantity( $options['quantity'] ); 403 423 404 if ( 'all' != $key ) 424 if ( 'all' != $key ) { 405 425 return isset( $options[ $key ] ) ? $options[ $key ] : false; 426 } 406 427 407 428 return $options; 408 429 } … … 437 458 $output['tag-name'] = $input['tag-name']; 438 459 } 439 460 440 if ( isset( $input['quantity'] ) ) 461 if ( isset( $input['quantity'] ) ) { 441 462 $output['quantity'] = self::sanitize_quantity( $input['quantity'] ); 463 } 442 464 443 465 $output['hide-tag'] = isset( $input['hide-tag'] ) && $input['hide-tag'] ? 1 : 0; 444 466 … … 458 480 public static function sanitize_quantity( $input ) { 459 481 $quantity = absint( $input ); 460 482 461 if ( $quantity > self::$max_posts ) 483 if ( $quantity > self::$max_posts ) { 462 484 $quantity = self::$max_posts; 463 else if ( 1 > $quantity )485 } else if ( 1 > $quantity ) { 464 486 $quantity = 1; 487 } 465 488 466 489 return $quantity; 467 490 } -
inc/template-tags.php
17 17 */ 18 18 function twentyfourteen_paging_nav() { 19 19 // Don't print empty markup if there's only one page. 20 if ( $GLOBALS['wp_query']->max_num_pages < 2 ) 20 if ( $GLOBALS['wp_query']->max_num_pages < 2 ) { 21 21 return; 22 } 22 23 23 24 $paged = get_query_var( 'paged' ) ? intval( get_query_var( 'paged' ) ) : 1; 24 25 $pagenum_link = html_entity_decode( get_pagenum_link() ); 25 26 $query_args = array(); 26 27 $url_parts = explode( '?', $pagenum_link ); 27 28 28 if ( isset( $url_parts[1] ) ) 29 if ( isset( $url_parts[1] ) ) { 29 30 wp_parse_str( $url_parts[1], $query_args ); 31 } 30 32 31 33 $pagenum_link = remove_query_arg( array_keys( $query_args ), $pagenum_link ); 32 34 $pagenum_link = trailingslashit( $pagenum_link ) . '%_%'; … … 72 74 $previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true ); 73 75 $next = get_adjacent_post( false, '', false ); 74 76 75 if ( ! $next && ! $previous ) 77 if ( ! $next && ! $previous ) { 76 78 return; 79 } 77 80 78 81 ?> 79 82 <nav class="navigation post-navigation" role="navigation"> … … 102 105 * @return void 103 106 */ 104 107 function twentyfourteen_posted_on() { 105 if ( is_sticky() && is_home() && ! is_paged() ) 108 if ( is_sticky() && is_home() && ! is_paged() ) { 106 109 echo '<span class="featured-post">' . __( 'Sticky', 'twentyfourteen' ) . '</span>'; 110 } 107 111 108 112 printf( __( '<span class="entry-date"><a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s">%3$s</time></a></span> <span class="byline"><span class="author vcard"><a class="url fn n" href="%4$s" rel="author">%5$s</a></span></span>', 'twentyfourteen' ), 109 113 esc_url( get_permalink() ), … … 167 171 * @return void 168 172 */ 169 173 function twentyfourteen_post_thumbnail() { 170 if ( post_password_required() || ! has_post_thumbnail() ) 174 if ( post_password_required() || ! has_post_thumbnail() ) { 171 175 return; 176 } 172 177 173 178 if ( is_singular() ) : 174 179 ?> 175 180 176 181 <div class="post-thumbnail"> 177 182 <?php 178 if ( ( ! is_active_sidebar( 'sidebar-2' ) || is_page_template( 'page-templates/full-width.php' ) ) && ! wp_is_mobile() ) 183 if ( ( ! is_active_sidebar( 'sidebar-2' ) || is_page_template( 'page-templates/full-width.php' ) ) && ! wp_is_mobile() ) { 179 184 the_post_thumbnail( 'twentyfourteen-full-width' ); 180 else185 } else { 181 186 the_post_thumbnail(); 187 } 182 188 ?> 183 189 </div> 184 190 … … 186 192 187 193 <a class="post-thumbnail" href="<?php the_permalink(); ?>" rel="<?php the_ID(); ?>"> 188 194 <?php 189 if ( ( ! is_active_sidebar( 'sidebar-2' ) || is_page_template( 'page-templates/full-width.php' ) ) && ! wp_is_mobile() ) 195 if ( ( ! is_active_sidebar( 'sidebar-2' ) || is_page_template( 'page-templates/full-width.php' ) ) && ! wp_is_mobile() ) { 190 196 the_post_thumbnail( 'twentyfourteen-full-width' ); 191 else197 } else { 192 198 the_post_thumbnail(); 199 } 193 200 ?> 194 201 </a> 195 202 -
inc/widgets.php
231 231 function update( $new_instance, $instance ) { 232 232 $instance['title'] = strip_tags( $new_instance['title'] ); 233 233 $instance['number'] = empty( $new_instance['number'] ) ? 2 : absint( $new_instance['number'] ); 234 if ( in_array( $new_instance['format'], $this->formats ) ) 234 if ( in_array( $new_instance['format'], $this->formats ) ) { 235 235 $instance['format'] = $new_instance['format']; 236 } 236 237 237 238 $this->flush_widget_cache(); 238 239 -
index.php
18 18 <div id="main-content" class="main-content"> 19 19 20 20 <?php 21 if ( is_front_page() && twentyfourteen_has_featured_posts() ) 21 if ( is_front_page() && twentyfourteen_has_featured_posts() ) { 22 22 get_template_part( 'featured-content' ); 23 } 23 24 ?> 24 25 25 26 <div id="primary" class="content-area"> -
page-templates/contributors.php
12 12 <div id="main-content" class="main-content"> 13 13 14 14 <?php 15 if ( is_front_page() && twentyfourteen_has_featured_posts() ) 15 if ( is_front_page() && twentyfourteen_has_featured_posts() ) { 16 16 get_template_part( 'featured-content' ); 17 } 17 18 ?> 18 19 19 20 <div id="primary" class="content-area"> … … 35 36 36 37 <?php 37 38 // If comments are open or we have at least one comment, load up the comment template. 38 if ( comments_open() || get_comments_number() ) 39 if ( comments_open() || get_comments_number() ) { 39 40 comments_template(); 41 } 40 42 endwhile; 41 43 ?> 42 44 </div><!-- #content --> -
page-templates/full-width.php
12 12 <div id="main-content" class="main-content"> 13 13 14 14 <?php 15 if ( is_front_page() && twentyfourteen_has_featured_posts() ) 15 if ( is_front_page() && twentyfourteen_has_featured_posts() ) { 16 16 get_template_part( 'featured-content' ); 17 } 17 18 ?> 18 19 19 20 <div id="primary" class="content-area"> … … 25 26 get_template_part( 'content', 'page' ); 26 27 27 28 // If comments are open or we have at least one comment, load up the comment template. 28 if ( comments_open() || get_comments_number() ) 29 if ( comments_open() || get_comments_number() ) { 29 30 comments_template(); 31 } 30 32 endwhile; 31 33 ?> 32 34 </div><!-- #content --> -
page.php
16 16 <div id="main-content" class="main-content"> 17 17 18 18 <?php 19 if ( is_front_page() && twentyfourteen_has_featured_posts() ) 19 if ( is_front_page() && twentyfourteen_has_featured_posts() ) { 20 20 get_template_part( 'featured-content' ); 21 } 21 22 ?> 22 23 <div id="primary" class="content-area"> 23 24 <div id="content" class="site-content" role="main"> … … 29 30 get_template_part( 'content', 'page' ); 30 31 31 32 // If comments are open or we have at least one comment, load up the comment template. 32 if ( comments_open() || get_comments_number() ) 33 if ( comments_open() || get_comments_number() ) { 33 34 comments_template(); 35 } 34 36 endwhile; 35 37 ?> 36 38 -
sidebar-content.php
7 7 * @since Twenty Fourteen 1.0 8 8 */ 9 9 10 if ( ! is_active_sidebar( 'sidebar-2' ) ) 10 if ( ! is_active_sidebar( 'sidebar-2' ) ) { 11 11 return; 12 } 12 13 ?> 13 14 <div id="content-sidebar" class="content-sidebar widget-area" role="complementary"> 14 15 <?php dynamic_sidebar( 'sidebar-2' ); ?> -
sidebar-footer.php
7 7 * @since Twenty Fourteen 1.0 8 8 */ 9 9 10 if ( ! is_active_sidebar( 'sidebar-3' ) ) 10 if ( ! is_active_sidebar( 'sidebar-3' ) ) { 11 11 return; 12 } 12 13 ?> 13 14 14 15 <div id="supplementary"> -
single.php
20 20 twentyfourteen_post_nav(); 21 21 22 22 // If comments are open or we have at least one comment, load up the comment template. 23 if ( comments_open() || get_comments_number() ) 23 if ( comments_open() || get_comments_number() ) { 24 24 comments_template(); 25 } 25 26 endwhile; 26 27 ?> 27 28 </div><!-- #content -->