*
* @package klopp
*/
/**
* Set up the WordPress core custom header feature.
*
* @uses klopp_header_style()
* @uses klopp_admin_header_style()
* @uses klopp_admin_header_image()
*/
function klopp_custom_header_setup() {
add_theme_support( 'custom-header', apply_filters( 'klopp_custom_header_args', array(
'default-image' => get_template_directory_uri().'/assets/images/header.jpg',
'default-text-color' => '#ffffff',
'width' => 1440,
'height' => 380,
'flex-height' => true,
'wp-head-callback' => 'klopp_header_style',
'admin-head-callback' => 'klopp_admin_header_style',
'admin-preview-callback' => 'klopp_admin_header_image',
) ) );
register_default_headers( array(
'default-image' => array(
'url' => '%s/assets/images/header.jpg',
'thumbnail_url' => '%s/assets/images/header.jpg',
'description' => __('Default Header Image', 'klopp')
)
)
);
}
add_action( 'after_setup_theme', 'klopp_custom_header_setup' );
if ( ! function_exists( 'klopp_header_style' ) ) :
/**
* Styles the header image and text displayed on the blog
*
* @see klopp_custom_header_setup().
*/
function klopp_header_style() {
?>
Header admin panel.
*
* @see klopp_custom_header_setup().
*/
function klopp_admin_header_style() {
?>
Header admin panel.
*
* @see klopp_custom_header_setup().
*/
function klopp_admin_header_image() {
$style = sprintf( ' style="color:#%s;"', get_header_textcolor() );
?>