Changeset 20983 for trunk/wp-content/themes/twentyten/functions.php
- Timestamp:
- 06/04/2012 02:43:19 PM (14 years ago)
- File:
-
- 1 edited
-
trunk/wp-content/themes/twentyten/functions.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/themes/twentyten/functions.php
r20973 r20983 102 102 // The custom header business starts here. 103 103 104 add_theme_support( 'custom-header',array(104 $custom_header_support = array( 105 105 // The default image to use. 106 106 // The %s is a placeholder for the theme template directory URI. … … 115 115 // Callback for styling the header preview in the admin. 116 116 'admin-head-callback' => 'twentyten_admin_header_style', 117 ) ); 117 ); 118 119 add_theme_support( 'custom-header', $custom_header_support ); 120 121 if ( ! function_exists( 'get_custom_header' ) ) { 122 // This is all for compatibility with versions of WordPress prior to 3.4. 123 define( 'HEADER_TEXTCOLOR', '' ); 124 define( 'NO_HEADER_TEXT', true ); 125 define( 'HEADER_IMAGE', $custom_header_support['default-image'] ); 126 define( 'HEADER_IMAGE_WIDTH', $custom_header_support['width'] ); 127 define( 'HEADER_IMAGE_HEIGHT', $custom_header_support['height'] ); 128 add_custom_image_header( '', $custom_header_support['admin-head-callback'] ); 129 add_custom_background(); 130 } 118 131 119 132 // We'll be using post thumbnails for custom header images on posts and pages. 120 133 // We want them to be 940 pixels wide by 198 pixels tall. 121 134 // Larger images will be auto-cropped to fit, smaller ones will be ignored. See header.php. 122 set_post_thumbnail_size( get_theme_support( 'custom-header', 'width' ), get_theme_support( 'custom-header', 'height' ), true );135 set_post_thumbnail_size( $custom_header_support['width'], $custom_header_support['height'], true ); 123 136 124 137 // ... and thus ends the custom header business.
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)