* * @package Buttercream * @since Buttercream 1.0 */ function buttercream_custom_header_setup() { // The default header text color define( 'HEADER_TEXTCOLOR', '333' ); // By leaving empty, we allow for random image rotation. $options = get_option( 'buttercream_theme_options' ); $headerstyle = $options['theme_style']; if( isset( $headerstyle ) && "" == $headerstyle || false == $headerstyle ) { $headerstyle = "cupcake"; } define( 'HEADER_IMAGE', '%s/img/' . $headerstyle . '.png' ); // The height and width of your custom header. // Add a filter to buttercream_header_image_width and buttercream_header_image_height to change these values. define( 'HEADER_IMAGE_WIDTH', apply_filters( 'buttercream_header_image_width', 850 ) ); define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'buttercream_header_image_height', 265 ) ); // Turn on random header image rotation by default. add_theme_support( 'custom-header', array( 'random-default' => true ) ); // Add a way for the custom header to be styled in the admin panel that controls custom headers add_custom_image_header( 'buttercream_header_setup', 'buttercream_admin_header_setup', 'buttercream_admin_header_image' ); } add_action( 'after_setup_theme', 'buttercream_custom_header_setup' ); if ( ! function_exists( 'buttercream_header_setup' ) ) : /** * Styles the header image and text displayed on the blog * * @since Buttercream 1.0 */ function buttercream_header_style() { // If no custom options for text are set, let's bail // get_header_textcolor() options: HEADER_TEXTCOLOR is default, hide text (returns 'blank') or any hex value if ( HEADER_TEXTCOLOR == get_header_textcolor() ) return; // If we get this far, we have custom styles. Let's do this. ?> Header admin panel. * * Referenced via add_custom_image_header() in Buttercream_s(). * * @since Buttercream 1.0 */ function buttercream_admin_header_style() { ?> Header admin panel. * * Referenced via add_custom_image_header() in buttercream_setup(). * * @since Buttercream 1.0 */ function buttercream_admin_header_image() { ?>

onclick="return false;" href="">

>