| 64 | | // Changeable header section starts here |
| 65 | | define( 'HEADER_TEXTCOLOR', 'FFFFFF' ); |
| 66 | | // No CSS. The %s is a placeholder for the theme template directory URI. |
| 67 | | define( 'HEADER_IMAGE', '%s/_inc/images/default_header.jpg' ); |
| 68 | | |
| 69 | | // The height and width of your custom header. You can hook into the theme's own filters to change these values. |
| 70 | | // Add a filter to bp_dtheme_header_image_width and bp_dtheme_header_image_height to change these values. |
| 71 | | define( 'HEADER_IMAGE_WIDTH', apply_filters( 'bp_dtheme_header_image_width', 1250 ) ); |
| 72 | | define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'bp_dtheme_header_image_height', 125 ) ); |
| 73 | | |
| 74 | | // We'll be using post thumbnails for custom header images on posts and pages. We want them to be 1250 pixels wide by 125 pixels tall. |
| 75 | | // Larger images will be auto-cropped to fit, smaller ones will be ignored. |
| 76 | | set_post_thumbnail_size( HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT, true ); |
| 77 | | |
| 78 | | // Add a way for the custom header to be styled in the admin panel that controls custom headers. |
| 79 | | add_custom_image_header( 'bp_dtheme_header_style', 'bp_dtheme_admin_header_style' ); |
| | 64 | if ( !defined( 'BP_DTHEME_DISABLE_CUSTOM_HEADER' ) ) { |
| | 65 | // Changeable header section starts here |
| | 66 | define( 'HEADER_TEXTCOLOR', 'FFFFFF' ); |
| | 67 | // No CSS. The %s is a placeholder for the theme template directory URI. |
| | 68 | define( 'HEADER_IMAGE', '%s/_inc/images/default_header.jpg' ); |
| | 69 | |
| | 70 | // The height and width of your custom header. You can hook into the theme's own filters to change these values. |
| | 71 | // Add a filter to bp_dtheme_header_image_width and bp_dtheme_header_image_height to change these values. |
| | 72 | define( 'HEADER_IMAGE_WIDTH', apply_filters( 'bp_dtheme_header_image_width', 1250 ) ); |
| | 73 | define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'bp_dtheme_header_image_height', 125 ) ); |
| | 74 | |
| | 75 | // We'll be using post thumbnails for custom header images on posts and pages. We want them to be 1250 pixels wide by 125 pixels tall. |
| | 76 | // Larger images will be auto-cropped to fit, smaller ones will be ignored. |
| | 77 | set_post_thumbnail_size( HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT, true ); |
| | 78 | |
| | 79 | // Add a way for the custom header to be styled in the admin panel that controls custom headers. |
| | 80 | add_custom_image_header( 'bp_dtheme_header_style', 'bp_dtheme_admin_header_style' ); |
| | 81 | } |