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 |
---|---|
108 | define( 'HEADER_TEXTCOLOR', '' ); |
109 |
|
110 | // No CSS, just IMG call. The %s is a placeholder for the theme template directory URI. |
111 | if ( ! defined( 'HEADER_IMAGE' ) ) |
112 | define( 'HEADER_IMAGE', '%s/images/headers/path.jpg' ); |
113 |
|
114 | // The height and width of your custom header. You can hook into the theme's own filters to change these values. |
115 | // Add a filter to twentyten_header_image_width and twentyten_header_image_height to change these values. |
116 | define( 'HEADER_IMAGE_WIDTH', apply_filters( 'twentyten_header_image_width', 940 ) ); |
117 | define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'twentyten_header_image_height', 198 ) ); |
118 |
|
119 | // We'll be using post thumbnails for custom header images on posts and pages. |
120 | // We want them to be 940 pixels wide by 198 pixels tall. |
121 | // Larger images will be auto-cropped to fit, smaller ones will be ignored. See header.php. |
122 | set_post_thumbnail_size( HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT, true ); |
123 |
|
124 | // Don't support text inside the header image. |
125 | if ( ! defined( 'NO_HEADER_TEXT' ) ) |
126 | define( 'NO_HEADER_TEXT', true ); |