本文整理汇总了PHP中get_header_textcolor函数的典型用法代码示例。如果您正苦于以下问题:PHP get_header_textcolor函数的具体用法?PHP get_header_textcolor怎么用?PHP get_header_textcolor使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_header_textcolor函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: header_style
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
}
示例2: landscape_admin_header_image
/**
* 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
}
示例3: digg3_header_style
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
}
示例4: chuchadon_header_style
/**
* 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";
}
}
示例5: wpt_style_header
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
}
示例6: wp_head
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
}
示例7: admin
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
}
示例8: corporate_admin_style
/**
* 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);
}
示例9: edin_admin_header_image
/**
* 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
}
示例10: artfolio_header_style
/**
* 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
}
示例11: slushman_2016_header_style
/**
* 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
}
示例12: redo_header_style
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
}
示例13: lifestyle_admin_style
/**
* 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);
}
示例14: elegant_grunge_header_style
/**
* 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
}
示例15: mh_logo
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";
}