*
* @package Parament
*/
/**
* Setup the WordPress core custom header feature.
*
* @uses parament_header_style()
* @uses parament_admin_header_style()
* @uses parament_admin_header_image()
*
* @package Parament
*/
function parament_custom_header_setup() {
add_theme_support( 'custom-header', apply_filters( 'parament_custom_header_args', array(
'default-text-color' => 'cccfd7',
'width' => apply_filters( 'parament_header_image_width', 950 ),
'height' => apply_filters( 'parament_header_image_height', 200 ),
'wp-head-callback' => 'parament_header_style',
'admin-head-callback' => 'parament_admin_header_style',
'admin-preview-callback' => 'parament_admin_header_image',
) ) );
}
add_action( 'after_setup_theme', 'parament_custom_header_setup' );
if ( ! function_exists( 'parament_header_style' ) ) :
/**
* Styles the header image and text displayed on the blog
*
* @see parament_custom_header_setup().
*/
function parament_header_style() {
$header_text_color = get_header_textcolor();
// 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 == $header_text_color )
return;
// If we get this far, we have custom styles. Let's do this.
?>
Header admin panel.
*
* @see parament_custom_header_setup().
*/
function parament_admin_header_style() {
$background_image = get_background_image();
if ( empty( $background_image ) )
$background_image = get_template_directory_uri() . '/images/diagonal-stripes-010.png';
?>
Header admin panel.
*
* @see parament_custom_header_setup().
*/
function parament_admin_header_image() {
$tagline = get_bloginfo( 'description', 'display' );
$header_image = get_header_image();
?>
%s', get_option( 'blogname' ) );
if ( ! empty( $tagline ) )
printf( '
%s
', $tagline );
if ( ! empty( $header_image ) )
printf( '', esc_url( $header_image ) );
?>