Commits

Doug Stewart committed 9a666ff

Suck it, Custom Headers Trebek.

Comments (0)

Files changed (2)

includes/functions/headers.php

 <?php
+function lblg_custom_headers_check() {
+	global $lblg_options;
+
+	// Only load custom header code if the option is checked
+	if( ( 1 == $lblg_options['use_custom_header'] ) && ( 'layoutgala.css' != $lblg_options['alt_stylesheet']) ){
+		add_custom_image_header( 'lblg_header_style', 'lblg_admin_header_style' );
+		add_action( 'after_setup_theme', 'lblg_register_headers', 11 );
+	}	
+}
+add_action( 'after_setup_theme', 'lblg_custom_headers_check' );
+
 function lblg_register_headers(){
 		// Set up custom header code
 		if( !defined('HEADER_IMAGE') ){
 			define( 'HEADER_IMAGE_HEIGHT', '200' );
 		}
 
-		add_custom_image_header( 'lblg_header_style', 'lblg_admin_header_style' );
-	
 		register_default_headers( array(
 			'fireworks' => array(
 				'url' => '%s/images/headers/fireworks.jpg',

includes/functions/supports.php

 add_action( 'widgets_init', 'lblg_register_sidebars' );
 
 /*
-* Support 2.9, 3.0 and 3.1 coolness
+* Add support for various WordPress-native functionality
 */
 if ( ! isset( $content_width ) ) $content_width = '640';
 add_theme_support( 'nav-menus' );