*
* @package chaostheory
*/
/**
* Setup the WordPress core custom header feature.
*
* @uses chaostheory_header_style()
* @uses chaostheory_admin_header_style()
* @uses chaostheory_admin_header_image()
*
* @package chaostheory
*/
function chaostheory_custom_header_setup() {
add_theme_support( 'custom-header', apply_filters( 'chaostheory_custom_header_args', array(
'default-image' => '',
'default-text-color' => 'ffffff',
'width' => 780,
'height' => 180,
'flex-height' => true,
'wp-head-callback' => 'chaostheory_header_style',
'admin-head-callback' => 'chaostheory_admin_header_style',
'admin-preview-callback' => 'chaostheory_admin_header_image',
) ) );
}
add_action( 'after_setup_theme', 'chaostheory_custom_header_setup' );
if ( ! function_exists( 'chaostheory_header_style' ) ) :
/**
* Styles the header image and text displayed on the blog
*
* @see chaostheory_custom_header_setup().
*/
function chaostheory_header_style() {
// If no custom options for text are set, let's bail
// get_header_textcolor() options: 'ffffff' is default, hide text (returns 'blank') or any hex value
if ( 'ffffff' === get_header_textcolor() )
return;
// If we get this far, we have custom styles. Let's do this.
?>
Header admin panel.
*
* @see chaostheory_custom_header_setup().
*/
function chaostheory_admin_header_style() {
?>
Header admin panel.
*
* @see chaostheory_custom_header_setup().
*/
function chaostheory_admin_header_image() { ?>