*
* @package Arunachala
*/
/**
* Setup the WordPress core custom header feature.
*
* @uses arunachala_header_style()
* @uses arunachala_admin_header_style()
* @uses arunachala_admin_header_image()
*
* @package Arunachala
*/
function arunachala_custom_header_setup() {
add_theme_support( 'custom-header', apply_filters( 'arunachala_custom_header_args', array(
'default-image' => '',
'default-text-color' => 'fff',
'width' => 960,
'height' => 100,
'flex-height' => true,
'wp-head-callback' => 'arunachala_header_style',
'admin-head-callback' => 'arunachala_admin_header_style',
'admin-preview-callback' => 'arunachala_admin_header_image',
) ) );
}
add_action( 'after_setup_theme', 'arunachala_custom_header_setup' );
if ( ! function_exists( 'arunachala_header_style' ) ) :
/**
* Styles the header image and text displayed on the blog
*
* @see arunachala_custom_header_setup().
*/
function arunachala_header_style() {
$text_color = get_header_textcolor();
// If no custom color for text is set, let's bail.
if ( display_header_text() && $text_color === get_theme_support( 'custom-header', 'default-text-color' ) )
return;
// If we get this far, we have custom styles. Let's do this.
?>
Header admin panel.
*
* @see arunachala_custom_header_setup().
*/
function arunachala_admin_header_style() {
?>
Header admin panel.
*
* @see arunachala_custom_header_setup().
*/
function arunachala_admin_header_image() {
$style = sprintf( ' style="color:#%s;"', get_header_textcolor() );
?>