~canonical-sysadmins/wordpress/4.7.2

« back to all changes in this revision

Viewing changes to wp-content/themes/twentyfourteen/featured-content.php

  • Committer: Haw Loeung
  • Date: 2016-12-13 06:56:21 UTC
  • mfrom: (1.1.20 upstream)
  • Revision ID: haw.loeung@canonical.com-20161213065621-8tcu7u7vlxgs2s81
Merge WP4.7 from upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?php
2
 
/**
3
 
 * The template for displaying featured content
4
 
 *
5
 
 * @package WordPress
6
 
 * @subpackage Twenty_Fourteen
7
 
 * @since Twenty Fourteen 1.0
8
 
 */
9
 
?>
10
 
 
11
 
<div id="featured-content" class="featured-content">
12
 
        <div class="featured-content-inner">
13
 
        <?php
14
 
                /**
15
 
                 * Fires before the Twenty Fourteen featured content.
16
 
                 *
17
 
                 * @since Twenty Fourteen 1.0
18
 
                 */
19
 
                do_action( 'twentyfourteen_featured_posts_before' );
20
 
 
21
 
                $featured_posts = twentyfourteen_get_featured_posts();
22
 
                foreach ( (array) $featured_posts as $order => $post ) :
23
 
                        setup_postdata( $post );
24
 
 
25
 
                        // Include the featured content template.
26
 
                        get_template_part( 'content', 'featured-post' );
27
 
                endforeach;
28
 
 
29
 
                /**
30
 
                 * Fires after the Twenty Fourteen featured content.
31
 
                 *
32
 
                 * @since Twenty Fourteen 1.0
33
 
                 */
34
 
                do_action( 'twentyfourteen_featured_posts_after' );
35
 
 
36
 
                wp_reset_postdata();
37
 
        ?>
38
 
        </div><!-- .featured-content-inner -->
39
 
</div><!-- #featured-content .featured-content -->