*
* @package Fanwood Light
*/
/**
* Setup the WordPress core custom header feature.
*
* @uses fanwood_light_header_style()
* @uses fanwood_light_admin_header_style()
* @uses fanwood_light_admin_header_image()
*
* @package Fanwood Light
*/
function fanwood_light_custom_header_setup() {
add_theme_support( 'custom-header', apply_filters( 'fanwood_light_custom_header_args', array(
'default-image' => '',
'default-text-color' => 'ffde01',
'width' => 920,
'height' => 160,
'flex-width' => true,
'flex-height' => true,
'wp-head-callback' => 'fanwood_light_header_style',
'admin-head-callback' => 'fanwood_light_admin_header_style',
'admin-preview-callback' => 'fanwood_light_admin_header_image',
) ) );
}
add_action( 'after_setup_theme', 'fanwood_light_custom_header_setup' );
if ( ! function_exists( 'fanwood_light_header_style' ) ) :
/**
* Styles the header image and text displayed on the blog
*
* @see fanwood_light_custom_header_setup().
*
* @since Fanwood Light 1.0
*/
function fanwood_light_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.
*
* @see fanwood_light_custom_header_setup().
*
* @since Fanwood Light 1.0
*/
function fanwood_light_admin_header_style() {
?>
Header admin panel.
*
* @see fanwood_light_custom_header_setup().
*
* @since fanwood_light 1.0
*/
function fanwood_light_admin_header_image() { ?>