* * @package Sight * @since Sight 1.0 */ /** * Setup the WordPress core custom header feature. * * @uses sight_header_style() * @uses sight_admin_header_style() * @uses sight_admin_header_image() * * @package Sight */ function sight_custom_header_setup() { add_theme_support( 'custom-header', apply_filters( 'sight_custom_header_args', array( 'default-image' => '', 'default-text-color' => '000', 'width' => 1160, 'height' => 300, 'flex-width' => false, 'flex-height' => true, 'wp-head-callback' => 'sight_header_style', 'admin-head-callback' => 'sight_admin_header_style', ) ) ); } add_action( 'after_setup_theme', 'sight_custom_header_setup' ); if ( ! function_exists( 'sight_header_style' ) ) : /** * Styles the header image and text displayed on the blog * * @see sight_custom_header_setup(). * * @since Sight 1.0 */ function sight_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() && '' == get_header_image() ) return; $header = get_custom_header(); // If we get this far, we have custom styles. Let's do this. ?> Header admin panel. * * @see sight_custom_header_setup(). * * @since Sight 1.0 */ function sight_admin_header_style() { $header = get_custom_header(); ?>