This module allows you to define a subset of posts to be displayed
in the theme's Featured Content area.
For maximum compatibility with different methods of posting users
will designate a featured post tag to associate posts with. Since
this tag now has special meaning beyond that of a normal tags, users
will have the ability to hide it from the front-end of their site.
delete_post_tag()
public static method
It's important to mention that the transient needs to be deleted, too.
While it may not be obvious by looking at the function alone, the transient
is deleted by Featured_Content::validate_settings().
Hooks in the "delete_post_tag" action.
get_featured_post_ids()
public static method
This function will return the an array containing the post IDs of all
featured posts.
Sets the "featured_content_ids" transient.
get_featured_posts()
public static method
This method is not intended to be called directly. Theme developers should
place a filter directly in their theme and then pass its name as a value of
the "filter" key in the array passed as the $args parameter during the call
to: add_theme_support( 'featured-content', $args ).
jetpack_update_featured_content_for_split_terms()
public static method
pre_get_posts()
public static method
Filter the home page posts, and remove any featured post ID's from it.
Hooked onto the 'pre_get_posts' action, this changes the parameters of the
query before it gets any posts.
public static pre_get_posts ( WP_Query $query ) : WP_Query |
$query |
WP_Query |
|
return |
WP_Query |
Possibly modified WP_Query |
$max_posts public_oe static_oe property
The maximum number of posts that a Featured Content area can contain. We
define a default value here but themes can override this by defining a
"max_posts" entry in the second parameter passed in the call to
add_theme_support( 'featured-content' ).
$post_types public_oe static_oe property
The registered post types supported by Featured Content. Themes can add
Featured Content support for registered post types by defining a
'post_types' argument (string|array) in the call to
add_theme_support( 'featured-content' ).
public static $post_types |