'', 'default-text-color' => '444', 'width' => 800, 'height' => 216, 'flex-height' => true, 'wp-head-callback' => 'autofocus_header_style', 'admin-head-callback' => 'autofocus_admin_header_style', 'admin-preview-callback' => 'autofocus_admin_header_image', ) ) ); } add_action( 'after_setup_theme', 'autofocus_custom_header_setup' ); /** * Shiv for get_custom_header(). * * get_custom_header() was introduced to WordPress * in version 3.4. To provide backward compatibility * with previous versions, we will define our own version * of this function. * * @return stdClass All properties represent attributes of the curent header image. * * @package Autofocus * @since Autofocus 1.1 */ if ( ! function_exists( 'get_custom_header' ) ) { function get_custom_header() { return (object) array( 'url' => get_header_image(), 'thumbnail_url' => get_header_image(), 'width' => HEADER_IMAGE_WIDTH, 'height' => HEADER_IMAGE_HEIGHT, ); } } if ( ! function_exists( 'autofocus_header_style' ) ) : /** * Styles the header image and text displayed on the blog * * @see autofocus_custom_header_setup(). * * @since Autofocus 1.1 */ function autofocus_header_style() { $header_image = get_header_image(); if ( ! empty( $header_image ) ) : ?> Header admin panel. * * @see autofocus_custom_header_setup(). * * @since Autofocus 1.1 */ function autofocus_admin_header_style() { ?> Header admin panel. * * @see autofocus_custom_header_setup(). * * @since Autofocus 1.1 */ function autofocus_admin_header_image() { ?>