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
108           define( 'HEADER_TEXTCOLOR', '' );
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' );
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 ) );
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 );
124      // Don't support text inside the header image.
125      if ( ! defined( 'NO_HEADER_TEXT' ) )
126           define( 'NO_HEADER_TEXT', true );