function header_style() { ?> <style type="text/css"> #header { background: #8EBAFD url(<?php header_image(); ?> ) left repeat-y; } <?php if ('blank' == get_header_textcolor()) { ?> #header h1 a, #header #desc { display: none; } <?php } else { ?> #header h1 a, #header h1 a:hover, #header #desc { color: #<?php header_textcolor(); ?> ; } <?php } ?> </style> <?php }
/** * Custom header image markup displayed on the Appearance > Header admin panel. * * @see landscape_custom_header_setup(). * * @since landscape 1.0 */ function landscape_admin_header_image() { ?> <div id="headimg"> <?php if ('blank' == get_header_textcolor() || '' == get_header_textcolor()) { $style = ' style="display:none;"'; } else { $style = ' style="color:#' . get_header_textcolor() . ';"'; } ?> <h1><a id="name"<?php echo $style; ?> onclick="return false;" href="<?php echo esc_url(home_url('/')); ?> "><?php bloginfo('name'); ?> </a></h1> <div id="desc"<?php echo $style; ?> ><?php bloginfo('description'); ?> </div> </div> <?php }
function digg3_header_style() { ?> <style type="text/css"> <?php if ('blank' == get_header_textcolor()) { ?> #header h1 a, #header .description { display: none; } <?php } else { ?> #header h1 a, #header h1 a:hover, #header .description { color: #<?php header_textcolor(); ?> ; } <?php } ?> </style> <?php }
/** * Styles the header image and text displayed on the blog * * @see chuchadon_custom_header_setup(). */ function chuchadon_header_style() { /* Header text color. */ $header_color = get_header_textcolor(); /* Header image. */ $header_image = esc_url(get_header_image()); /* Start header styles. */ $style = ''; /* Header image height. */ $header_height = get_custom_header()->height; /* Header image width. */ $header_width = get_custom_header()->width; /* When to show header image. */ $min_width = absint(apply_filters('chuchadon_header_bg_show', 800)); $background_arguments = esc_attr(apply_filters('chuchadon_header_bg_arguments', 'no-repeat')); if (!empty($header_image)) { $style .= "@media screen and (min-width: {$min_width}px) { body.custom-header-image .site-header { background: url({$header_image}) {$background_arguments}; -webkit-background-size: 50%; -moz-background-size: 50%; -o-background-size: 50%; background-size: 50%; } }"; } /* Site title styles. */ if (display_header_text()) { $style .= ".home-title a { color: #{$header_color} }"; } if (!display_header_text()) { $style .= ".home-title, .home-description { clip: rect(1px, 1px, 1px, 1px); position: absolute; height: 1px; width: 1px; overflow: hidden; }"; } /* Echo styles if it's not empty. */ if (!empty($style)) { echo "\n" . '<style type="text/css" id="custom-header-css">' . trim($style) . '</style>' . "\n"; } }
function wpt_style_header() { $text_color = get_header_textcolor(); ?> <style type="text/css"> #header .site-title a { color: #<?php echo esc_attr($text_color); ?> ; } <?php if (display_header_text() != true) { ?> .site-title { display: none; } <?php } ?> </style> <?php }
public static function wp_head() { $header_text_color = get_header_textcolor(); if (has_post_thumbnail()) { $thumb = wp_get_attachment_url(get_post_thumbnail_id()); $banner_tint = get_banner_tint(); } ?> <style type="text/css"> <!-- /* Custom Header CSS */ <?php if ('' !== $header_text_color && 'blank' !== $header_text_color) { ?> #banner-wrapper #banner #tagline { color: #<?php echo esc_html($header_text_color); ?> ; } /* Banner CSS */ .banner-tint { background-color: <?php echo esc_html($banner_tint); ?> ; } <?php } ?> --> </style> <?php }
static function admin() { wp_enqueue_style('mythemes-google-fonts', 'http://fonts.googleapis.com/css?family=Montserrat:400,700|Noto+Sans:400,700,400italic,700italic'); wp_enqueue_style('mythemes-effects', get_template_directory_uri() . '/media/css/effects.css'); wp_enqueue_style('mythemes-header', get_template_directory_uri() . '/media/css/header.css'); ?> <style> div.mythemes-header .valign-cell h1{ color: <?php echo get_header_textcolor(); ?> ; } div.mythemes-header .valign-cell p{ color: rgba(<?php echo mythemes_hex2rgb(get_header_textcolor()); ?> , 0.65 ); } div.mythemes-header .valign-cell p.buttons a.btn{ background: <?php echo myThemes::get('first-color'); ?> } div.mythemes-header .valign-cell p.buttons a.btn.second-button{ background: <?php echo myThemes::get('second-color'); ?> } </style> <?php }
/** * Register a custom admin callback to display the custom header preview with the * same style as is shown on the front end. * */ function corporate_admin_style() { $headimg = sprintf('.appearance_page_custom-header #headimg { background: url(%s) no-repeat; font-family: Droid Sans, arial, serif; min-height: %spx; text-shadow: #000 1px 1px; }', get_header_image(), HEADER_IMAGE_HEIGHT); $h1 = sprintf('#headimg h1, #headimg h1 a { color: #%s; font-size: 30px; font-weight: normal; line-height: 30px; margin: 40px 0 0 15px; text-decoration: none; }', esc_html(get_header_textcolor())); $desc = sprintf('#headimg #desc { color: #%s; font-size: 16px; line-height: 1; margin: 10px 0 0 30px; }', esc_html(get_header_textcolor())); printf('<style type="text/css">%1$s %2$s %3$s</style>', $headimg, $h1, $desc); }
/** * Custom header image markup displayed on the Appearance > Header admin panel. * * @see goran_custom_header_setup(). */ function edin_admin_header_image() { $style = sprintf(' style="color:#%s;"', get_header_textcolor()); $image = sprintf(' style="background-image:none"', get_header_image()); if (get_header_image()) { $image = sprintf(' style="background-image:url(%s)"', get_header_image()); } ?> <div id="headimg"<?php echo $image; ?> > <h1 class="displaying-header-text"><a id="name"<?php echo $style; ?> onclick="return false;" href="<?php echo esc_url(home_url('/')); ?> "><?php bloginfo('name'); ?> </a></h1> </div> <?php }
/** * Styles the header image and text displayed on the blog. * * @see artfolio_custom_header_setup(). */ function artfolio_header_style() { $header_text_color = get_header_textcolor(); /* * If no custom options for text are set, let's bail. * get_header_textcolor() options: Any hex value, 'blank' to hide text. Default: HEADER_TEXTCOLOR. */ if (HEADER_TEXTCOLOR === $header_text_color) { return; } // If we get this far, we have custom styles. Let's do this. ?> <style type="text/css"> <?php // Has the text been hidden? if (!display_header_text()) { ?> .site-title,.site-description {position: absolute;clip: rect(1px, 1px, 1px, 1px);} <?php // If the user has set a custom color for the text use that. } else { ?> .site-title a, .site-description { color: #<?php echo esc_attr($header_text_color); ?> ; } <?php } ?> </style> <?php }
/** * Styles the header image and text displayed on the blog * * @see slushman_2016_custom_header_setup(). * * @uses get_header_textcolor() */ function slushman_2016_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. ?> <style type="text/css"><?php // Has the text been hidden? if ('blank' == $header_text_color) { ?> .site-title, .site-description { position: absolute; clip: rect(1px, 1px, 1px, 1px); }<?php // If the user has set a custom color for the text use that. } else { ?> .site-title a, .site-description { color: #<?php echo esc_attr($header_text_color); ?> ; }<?php } ?> </style><?php }
function redo_header_style() { ?> <style type="text/css"> #header_content { background:#900 url(<?php header_image(); ?> ) center repeat-y; } <?php if ('blank' == get_header_textcolor()) { ?> #header_content #title { display: none; } <?php } else { ?> #header_content h1 a, #header_content h1 a:hover { color: #<?php header_textcolor(); ?> ; } <?php } ?> </style> <?php }
/** * Register a custom admin callback to display the custom header preview with the * same style as is shown on the front end. * */ function lifestyle_admin_style() { $headimg = sprintf('.appearance_page_custom-header #headimg { background: url(%s) no-repeat; font-family: Georgia, Times, serif; min-height: %spx; text-align: center; text-shadow: #666 1px 1px; }', get_header_image(), HEADER_IMAGE_HEIGHT); $h1 = sprintf('#headimg h1, #headimg h1 a { color: #%s; font-size: 48px; font-variant: small-caps; font-weight: normal; line-height: 48px; margin: 35px 0 0; text-decoration: none; }', esc_html(get_header_textcolor())); $desc = sprintf('#headimg #desc { color: #%s; font-size: 20px; font-style: italic; line-height: 1; margin: 0; }', esc_html(get_header_textcolor())); printf('<style type="text/css">%1$s %2$s %3$s</style>', $headimg, $h1, $desc); }
/** * Styles the header image and text displayed on the blog * * @see elegant_grunge_custom_header_setup(). * */ function elegant_grunge_header_style() { ?> <style type="text/css"> <?php if ('blank' != get_header_textcolor()) { ?> #header div a, #header h1, #header h2, #blog-description { color: #<?php header_textcolor(); ?> ; } <?php } else { ?> #header h1, #header h2, #blog-description { display: none; } <?php } ?> </style> <?php }
function mh_logo() { $header_img = get_header_image(); $header_title = get_bloginfo('name'); $header_desc = get_bloginfo('description'); echo '<a href="' . esc_url(home_url('/')) . '" title="' . esc_attr($header_title) . '" rel="home">' . "\n"; echo '<div class="logo-wrap" role="banner">' . "\n"; if ($header_img) { echo '<img src="' . esc_url($header_img) . '" height="' . get_custom_header()->height . '" width="' . get_custom_header()->width . '" alt="' . esc_attr($header_title) . '" />' . "\n"; } if (display_header_text()) { $header_img ? $logo_pos = 'logo-overlay' : ($logo_pos = 'logo-text'); $text_color = get_header_textcolor(); if ($text_color != get_theme_support('custom-header', 'default-text-color')) { echo '<style type="text/css" id="mh-header-css">'; echo '.logo-name, .logo-desc { color: #' . esc_attr($text_color) . '; }'; echo '.logo-name { border-bottom: 3px solid #' . esc_attr($text_color) . '; }'; echo '</style>' . "\n"; } echo '<div class="logo ' . $logo_pos . '">' . "\n"; if ($header_title) { echo '<h1 class="logo-name">' . esc_attr($header_title) . '</h1>' . "\n"; } if ($header_desc) { echo '<h2 class="logo-desc">' . esc_attr($header_desc) . '</h2>' . "\n"; } echo '</div>' . "\n"; } echo '</div>' . "\n"; echo '</a>' . "\n"; }
function mh_newsdesk_lite_logo() { $header_img = get_header_image(); $header_title = get_bloginfo('name'); $header_desc = get_bloginfo('description'); echo '<a href="' . esc_url(home_url('/')) . '" title="' . esc_attr($header_title) . '" rel="home">' . "\n"; echo '<div class="logo-wrap" role="banner">' . "\n"; if ($header_img) { echo '<img src="' . esc_url($header_img) . '" height="' . get_custom_header()->height . '" width="' . get_custom_header()->width . '" alt="' . esc_attr($header_title) . '" />' . "\n"; } if (0 && display_header_text()) { $text_color = get_header_textcolor(); if ($text_color != get_theme_support('custom-header', 'default-text-color')) { echo '<style type="text/css" id="mh-header-css">'; echo '.logo-title, .logo-tagline { color: #' . esc_attr($text_color) . '; }'; echo '</style>' . "\n"; } echo '<div class="logo">' . "\n"; if ($header_title) { echo '<h1 class="logo-title">' . esc_attr($header_title) . '</h1>' . "\n"; } if ($header_desc) { echo '<h2 class="logo-tagline">' . esc_attr($header_desc) . '</h2>' . "\n"; } echo '</div>' . "\n"; } echo '</div>' . "\n"; echo '</a>' . "\n"; }
/** * Print custom header styles * @return void */ function pu06_custom_header() { $styles = ''; if ($color = get_header_textcolor()) { echo '<style type="text/css"> ' . '.site-header .logo .blog-name, .site-header .logo .blog-description {' . 'color: #' . $color . ';' . '}' . '</style>'; } }
/** * Register a custom admin callback to display the custom header preview with the * same style as is shown on the front end. * */ function fabric_admin_style() { $headimg = sprintf('.appearance_page_custom-header #headimg { background: url(%s) no-repeat; font-family: Georgia, Times, Times New Roman, serif; min-height: %spx; }', get_header_image(), HEADER_IMAGE_HEIGHT); $h1 = sprintf('#headimg h1, #headimg h1 a { color: #%s; font-family: Pacifico, arial, serif; font-size: 48px; font-weight: normal; line-height: 60px; margin: 10px 0 0; text-align: center; text-decoration: none; text-shadow: #fff 1px 1px; }', esc_html(get_header_textcolor())); $desc = sprintf('#headimg #desc { color: #%s; font-family: Georgia, Times, Times New Roman, serif; font-size: 14px; font-style: italic; text-align: center; text-shadow: #fff 1px 1px; }', esc_html(get_header_textcolor())); printf('<style type="text/css">%1$s %2$s %3$s</style>', $headimg, $h1, $desc); }
/** * Register a custom admin callback to display the custom header preview with the * same style as is shown on the front end. * */ function minimum_admin_style() { $headimg = sprintf('.appearance_page_custom-header #headimg { background: url(%s) no-repeat; font-family: Oswald, arial, serif; min-height: %spx; }', get_header_image(), HEADER_IMAGE_HEIGHT); $h1 = sprintf('#headimg h1, #headimg h1 a { color: #%s; font-size: 48px; font-weight: normal; line-height: 48px; margin: 25px 0 0; text-decoration: none; }', esc_html(get_header_textcolor())); $desc = sprintf('#headimg #desc { color: #%s; display: none; }', esc_html(get_header_textcolor())); printf('<style type="text/css">%1$s %2$s %3$s</style>', $headimg, $h1, $desc); }
function onetone_custom_scripts() { wp_enqueue_style('onetone-font-awesome', get_template_directory_uri() . '/css/font-awesome.min.css', false, '4.0.3', false); wp_enqueue_style('onetone-main', get_stylesheet_uri(), array(), '1.2.8'); wp_enqueue_style('Yanone-Kaffeesatz', esc_url('//fonts.googleapis.com/css?family=Yanone+Kaffeesatz|Lustria|Raleway|Open+Sans:400,300'), false, '', false); $background_array = onetone_options_array("page_background"); $background = onetone_get_background($background_array); $header_image = get_header_image(); $onetone_custom_css = ""; if (isset($header_image) && !empty($header_image)) { $onetone_custom_css .= ".home-header{background:url(" . $header_image . ") repeat;}\n"; } if ('blank' != get_header_textcolor() && '' != get_header_textcolor()) { $header_color = ' color:#' . get_header_textcolor() . ';'; $onetone_custom_css .= '.home-header,.site-name,.site-description{' . $header_color . '}'; } $custom_css = onetone_options_array("custom_css"); $onetone_custom_css .= '.site{' . $background . '}'; $top_menu_font_color = onetone_options_array('font_color'); if ($top_menu_font_color != "" && $top_menu_font_color != null) { $onetone_custom_css .= 'header #menu-main > li > a span,header .top-nav > ul > li > a span{color:' . $top_menu_font_color . '}'; } $onetone_custom_css .= $custom_css; wp_add_inline_style('onetone-main', $onetone_custom_css); if (is_home()) { wp_enqueue_script('onetone-bigvideo', get_template_directory_uri() . '/js/jquery.tubular.1.0.js', array('jquery'), '1.0', true); } wp_enqueue_script('onetone-modernizr', get_template_directory_uri() . '/js/modernizr.custom.js', array('jquery'), '2.8.2 ', false); wp_enqueue_script('onetone-unslider', get_template_directory_uri() . '/js/unslider.js', array('jquery'), '1.0.0 ', true); wp_enqueue_script('onetone-default', get_template_directory_uri() . '/js/onetone.js', array('jquery'), '1.2.8', true); if (is_singular() && comments_open() && get_option('thread_comments')) { wp_enqueue_script('comment-reply'); } wp_localize_script('onetone-default', 'onetone_params', array('ajaxurl' => admin_url('admin-ajax.php'), 'themeurl' => get_template_directory_uri())); }
/** * Styles the header image and text displayed on the blog */ function apostrophe_header_style() { $header_image = get_header_image(); $text_color = get_header_textcolor(); /* Output the CSS for our custom styles */ ?> <style type="text/css" id="apostrophe-header-css"> <?php /* Do we have a custom header image? */ if ('' !== get_header_image()) { ?> .site-branding { background: url('<?php echo esc_url(get_header_image()); ?> ') center center; background-size: cover; min-height: 200px; padding: 3em; } <?php } /* Has the text been hidden? */ if (!display_header_text()) { ?> .site-title, .site-description { clip: rect(1px, 1px, 1px, 1px); position: absolute; } .site-branding { text-align: center; } .site-logo { float: none; margin-top: 0; margin-bottom: 3.5px; } <?php /* If the user has set a custom color for the text, use that. */ } elseif (get_theme_support('custom-header', 'default-text-color') !== $text_color) { ?> .site-title a, .site-description { color: #<?php echo esc_attr($text_color); ?> ; } <?php } ?> </style> <?php }
/** * Uses the correct color for the site title on embeds. * * @since 3.0.0 * @access public * @return void */ function stargazer_custom_header_embed_head() { $hex = get_header_textcolor(); if (!$hex) { return; } $style = ".wp-embed-site-title a { color: #{$hex}; }"; echo "\n" . '<style type="text/css" id="custom-header-css">' . trim($style) . '</style>' . "\n"; }
function kvarken_header_textcolor() { echo '<style type="text/css"> .site-title a, .site-description { color: #' . get_header_textcolor() . '!important; } </style>'; }
/** * Load appropriate header styles * @return null */ function arras_header_style() { $header_image = get_header_image(); $text_color = get_header_textcolor(); // If no custom options for text are set, let's bail. if (empty($header_image) && $text_color == get_theme_support('custom-header', 'default-text-color')) { return; } // If we get this far, we have custom styles. ?> <style type="text/css" id="custom-header-css"> <?php if (!empty($header_image)) { ?> #branding { background: url(<?php header_image(); ?> ) no-repeat scroll left; background-size: cover; } <?php } // Has the text been hidden? if (!display_header_text()) { ?> .site-title, .site-description { position: absolute; clip: rect(1px 1px 1px 1px); /* IE7 */ clip: rect(1px, 1px, 1px, 1px); } <?php if (empty($header_image)) { ?> .site-header .home-link { min-height: 0; } <?php } // If the user has set a custom color for the text, use that. } elseif ($text_color != get_theme_support('custom-header', 'default-text-color')) { ?> .site-title, .site-description { color: #<?php echo esc_attr($text_color); ?> ; } <?php } ?> </style> <?php }
/** * Styles the header image and text displayed on the blog. * * @see twentyseventeen_custom_header_setup(). */ function twentyseventeen_header_style() { $header_text_color = get_header_textcolor(); // If no custom options for text are set, let's bail. // get_header_textcolor() options: add_theme_support( 'custom-header' ) is default, hide text (returns 'blank') or any hex value. if (get_theme_support('custom-header', 'default-text-color') === $header_text_color) { return; } // If we get this far, we have custom styles. Let's do this. ?> <style id="twentyseventeen-custom-header-styles" type="text/css"> <?php // Has the text been hidden? if ('blank' === $header_text_color) { ?> .site-title, .site-description { position: absolute; clip: rect(1px, 1px, 1px, 1px); } <?php // If the user has set a custom color for the text use that. } else { ?> .site-title a, .colors-dark .site-title a, .colors-custom .site-title a, body.has-header-image .site-title a, body.has-header-video .site-title a, body.has-header-image.colors-dark .site-title a, body.has-header-video.colors-dark .site-title a, body.has-header-image.colors-custom .site-title a, body.has-header-video.colors-custom .site-title a, .site-description, .colors-dark .site-description, .colors-custom .site-description, body.has-header-image .site-description, body.has-header-video .site-description, body.has-header-image.colors-dark .site-description, body.has-header-video.colors-dark .site-description, body.has-header-image.colors-custom .site-description, body.has-header-video.colors-custom .site-description { color: #<?php echo esc_attr($header_text_color); ?> ; } <?php } ?> </style> <?php }
/** * This function/filter adds new classes to the <body> * so that we can use psuedo-variables in our CSS file, * which helps us achieve multiple header layouts with minimal code * * @since 0.2.2 */ function genesis_header_body_classes($classes) { // add header classes to $classes array if (!is_active_sidebar('header-right')) { $classes[] = 'header-full-width'; } if ('image' == genesis_get_option('blog_title') || 'blank' == get_header_textcolor()) { $classes[] = 'header-image'; } // return filtered $classes return $classes; }
function material_gaze_custom_header_wp_head() { if (!display_header_text()) { return; } $hex = get_header_textcolor(); if (empty($hex)) { return; } $style = "body.custom-header #branding, #site-title { color: #{$hex}; }"; echo "\n" . '<style type="text/css" id="custom-header-css">' . trim($style) . '</style>' . "\n"; }
/** * Callback function for outputting the custom header CSS to `wp_head`. * * @since 1.0.0 * @access public * @return void */ function stargazer_custom_header_wp_head() { if (!display_header_text()) { return; } $hex = get_header_textcolor(); if (!$hex) { return; } $style = "body.custom-header #site-title a { color: #{$hex}; }"; echo "\n" . '<style type="text/css" id="custom-header-css">' . trim($style) . '</style>' . "\n"; }
function nordby_insert_custom() { $text_color = get_header_textcolor(); $header_image = get_header_image(); $design_color = get_theme_mod('design_color'); ?> <style>@media screen and (min-width:1000px){.js #sidebar{border-color:<?php echo $design_color; ?> }} <?php }
/** * Styles the header image and text displayed on the blog. * * @see octopus_custom_header_setup(). */ function octopus_header_style() { $header_text_color = get_header_textcolor(); // If no custom options are set, let's bail. if (!get_theme_mods()) { return; } // If we get this far, we have custom styles. Let's do this. ?> <style type="text/css" id="octopus-custom-style"> <?php /* * If no custom options for text are set, let's bail. * get_header_textcolor() options: Any hex value, 'blank' to hide text. Default: HEADER_TEXTCOLOR. */ if (!HEADER_TEXTCOLOR === $header_text_color) { // Has the text been hidden? if (!display_header_text()) { ?> .site-title, .site-description { position: absolute; clip: rect(1px, 1px, 1px, 1px); } <?php // If the user has set a custom color for the text use that. } else { ?> .site-title a, .site-description { color: #<?php echo esc_attr($header_text_color); ?> ; } <?php } ?> <?php } ?> <?php octopus_generate_css('#page.container', 'max-width', 'container_max_width', '', '', true); //Header octopus_generate_css('.container-fluid .octopus-wrapper', 'max-width', 'wrapped_element_max_width', '', 'px', true); // Header banner octopus_generate_css('.octopus-header-banner', 'height', 'header_banner_height', '', 'px', true); ?> </style> <?php }