wp-content/themes/twentyfourteen/inc/featured-content.php:143Get featured post IDs
array public static function get_featured_post_ids() { // Get array of cached results if they exist. $featured_ids = get_transient( 'featured_content_ids' ); if ( false === $featured_ids ) { $settings = self::get_setting(); $term = get_term_by( 'name', $settings['tag-name'], 'post_tag' ); if ( $term ) { // Query for featured posts. $featured_ids = get_posts( array( 'fields' => 'ids', 'numberposts' => self::$max_posts, 'suppress_filters' => false, 'tax_query' => array( array( 'field' => 'term_id', 'taxonomy' => 'post_tag', 'terms' => $term->term_id, ), ), ) ); } // Get sticky posts if no Featured Content exists. if ( ! $featured_ids ) { $featured_ids = self::get_sticky_posts(); } set_transient( 'featured_content_ids', $featured_ids ); } // Ensure correct format before return. return array_map( 'absint', $featured_ids ); }Introduced in Twenty Fourteen 1.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-content/themes/twentyfourteen/inc/featured-content.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.