*
* @package Grid Focus
*/
/**
* Setup the WordPress core custom header feature.
*
* @uses grid_focus_header_style()
* @uses grid_focus_admin_header_style()
* @uses grid_focus_admin_header_image()
*
* @package Grid Focus
*/
function grid_focus_custom_header_setup() {
add_theme_support( 'custom-header', apply_filters( 'grid_focus_custom_header_args', array(
'default-text-color' => '000',
'default-image' => '',
'width' => 970,
'height' => 175,
'wp-head-callback' => 'grid_focus_header_style',
'admin-head-callback' => 'grid_focus_admin_header_style',
'admin-preview-callback' => 'grid_focus_admin_header_image',
) ) );
}
add_action( 'after_setup_theme', 'grid_focus_custom_header_setup' );
if ( ! function_exists( 'grid_focus_header_style' ) ) :
/**
* Styles the header image and text displayed on the blog
*
* @see grid_focus_custom_header_setup().
*
*/
function grid_focus_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;
// If we get this far, we have custom styles. Let's do this.
?>
Header admin panel.
*
* @see grid_focus_custom_header_setup().
*
*/
function grid_focus_admin_header_style() {
?>