*
* @package rad
*/
/**
* Set up the WordPress core custom header feature.
*
* @uses rad_header_style()
* @uses rad_admin_header_style()
* @uses rad_admin_header_image()
*/
function rad_custom_header_setup() {
add_theme_support( 'custom-header', apply_filters( 'rad_custom_header_args', array(
'default-image' => get_template_directory_uri() . '/images/header.jpg',
'default-text-color' => false,
'width' => 1440,
'height' => 600,
'flex-height' => true,
'wp-head-callback' => 'rad_header_style',
'admin-head-callback' => 'rad_admin_header_style',
'admin-preview-callback' => 'rad_admin_header_image',
) ) );
}
add_action( 'after_setup_theme', 'rad_custom_header_setup' );
if ( ! function_exists( 'rad_header_style' ) ) :
/**
* Styles the header image and text displayed on the blog
*
* @see rad_custom_header_setup().
*/
function rad_header_style() {
$header_image = get_header_image();
// If no custom options for text are set, let's bail
if ( empty( $header_image ) && display_header_text() ) {
return;
}
// If we get this far, we have custom styles. Let's do this.
?>
Header admin panel.
*
* @see rad_custom_header_setup().
*/
function rad_admin_header_style() {
?>
Header admin panel.
*
* @see rad_custom_header_setup().
*/
function rad_admin_header_image() {
?>