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 |
---|---|
113 | // This theme uses Featured Images (also known as post thumbnails) for per-post/per-page Custom Header images |
114 | add_theme_support( 'post-thumbnails' ); |
115 |
|
116 | // Add support for custom headers. |
117 | $custom_header_support = array( |
118 | // The default header text color. |
119 | 'default-text-color' => '000', |
120 | // The height and width of our custom header. |
121 | 'width' => apply_filters( 'twentyeleven_header_image_width', 1000 ), |
122 | 'height' => apply_filters( 'twentyeleven_header_image_height', 288 ), |
123 | // Support flexible heights. |
124 | 'flex-height' => true, |
125 | // Random image rotation by default. |
126 | 'random-default' => true, |
127 | // Callback for styling the header. |
128 | 'wp-head-callback' => 'twentyeleven_header_style', |
129 | // Callback for styling the header preview in the admin. |
130 | 'admin-head-callback' => 'twentyeleven_admin_header_style', |
131 | // Callback used to display the header preview in the admin. |