WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
| Line | Code |
|---|---|
| 95 | /* |
| 96 | * Enable support for Post Formats. |
| 97 | * See https://codex.wordpress.org/Post_Formats |
| 98 | */ |
| 99 | add_theme_support( 'post-formats', array( |
| 100 | 'aside', 'image', 'video', 'audio', 'quote', 'link', 'gallery', |
| 101 | ) ); |
| 102 | |
| 103 | // This theme allows users to set a custom background. |
| 104 | add_theme_support( 'custom-background', apply_filters( 'twentyfourteen_custom_background_args', array( |
| 105 | 'default-color' => 'f5f5f5', |
| 106 | ) ) ); |
| 107 | |
| 108 | // Add support for featured content. |
| 109 | add_theme_support( 'featured-content', array( |
| 110 | 'featured_content_filter' => 'twentyfourteen_get_featured_posts', |
| 111 | 'max_posts' => 6, |
| 112 | ) ); |
| 113 | |