*
* @package Mixfolio
* @since Mixfolio 1.1
*/
/**
* Setup the WordPress core custom header feature.
*
* @uses mixfolio_header_style()
* @uses mixfolio_admin_header_style()
* @uses mixfolio_admin_header_image()
*
* @package Mixfolio
*/
function mixfolio_custom_header_setup() {
add_theme_support( 'custom-header', apply_filters( 'mixfolio_custom_header_args', array(
'width' => 980,
'height' => 275,
'header-text' => false,
'flex-height' => true,
'flex-width' => true,
'wp-head-callback' => 'mixfolio_header_style',
'admin-head-callback' => 'mixfolio_admin_header_style',
'admin-preview-callback' => 'mixfolio_admin_header_image',
) ) );
}
add_action( 'after_setup_theme', 'mixfolio_custom_header_setup' );
if ( ! function_exists( 'mixfolio_header_style' ) ) :
/**
* Styles the header image and text displayed on the blog
*
* @see mixfolio_custom_header_setup().
*
* @since Mixfolio 1.1
*/
function mixfolio_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
$header_image = get_header_image();
if ( false === $header_image )
return;
// If we get this far, we have custom styles. Let's do this.
?>
Header admin panel.
*
* @see mixfolio_custom_header_setup().
*
* @since Mixfolio 1.1
*/
function mixfolio_admin_header_style() {
?>
Header admin panel.
*
* @see mixfolio_custom_header_setup().
*
* @since Mixfolio 1.1
*/
function mixfolio_admin_header_image() { ?>