Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: twentyten_header_image_height

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
102
103      // Your changeable header business starts here
104      define( 'HEADER_TEXTCOLOR', '' );
105      // No CSS, just IMG call. The %s is a placeholder for the theme template directory URI.
106      define( 'HEADER_IMAGE', '%s/images/headers/path.jpg' );
107
108      // The height and width of your custom header. You can hook into the theme's own filters to change these values.
109      // Add a filter to twentyten_header_image_width and twentyten_header_image_height to change these values.
110      define( 'HEADER_IMAGE_WIDTH', apply_filters( 'twentyten_header_image_width', 940 ) );
111      define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'twentyten_header_image_height', 198 ) );
112
113      // We'll be using post thumbnails for custom header images on posts and pages.
114      // We want them to be 940 pixels wide by 198 pixels tall.
115      // Larger images will be auto-cropped to fit, smaller ones will be ignored. See header.php.
116      set_post_thumbnail_size( HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT, true );
117
118      // Don't support text inside the header image.
119      define( 'NO_HEADER_TEXT', true );
120