• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP get_header_textcolor函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中get_header_textcolor函数的典型用法代码示例。如果您正苦于以下问题:PHP get_header_textcolor函数的具体用法?PHP get_header_textcolor怎么用?PHP get_header_textcolor使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了get_header_textcolor函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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 
}
开发者ID:rmccue,项目名称:wordpress-unit-tests,代码行数:31,代码来源:functions.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 
    }
开发者ID:pradeep-web,项目名称:brandt,代码行数:38,代码来源:custom-header.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 
}
开发者ID:rmccue,项目名称:wordpress-unit-tests,代码行数:25,代码来源:functions.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";
     }
 }
开发者ID:samikeijonen,项目名称:chuchadon,代码行数:35,代码来源:custom-header.php


示例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 
}
开发者ID:kirandash,项目名称:bijithemecustomizer,代码行数:27,代码来源:functions.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 
    }
开发者ID:jimmyandrade,项目名称:flegondavid.com.br,代码行数:35,代码来源:class-customizer.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 
    }
开发者ID:serpentinegalleries,项目名称:marathon-transformation,代码行数:32,代码来源:header.class.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);
}
开发者ID:nmrugg,项目名称:studiopress-premum-wp-themes,代码行数:12,代码来源:functions.php


示例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 
}
开发者ID:piparia,项目名称:piparia-goran-theme,代码行数:30,代码来源:custom-header.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 
    }
开发者ID:kkowatsch,项目名称:Yeoman,代码行数:40,代码来源:custom-header.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 
    }
开发者ID:slushman,项目名称:slushman-2016,代码行数:40,代码来源:custom-header.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 
}
开发者ID:rmccue,项目名称:wordpress-unit-tests,代码行数:31,代码来源:functions.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);
}
开发者ID:nmrugg,项目名称:studiopress-premum-wp-themes,代码行数:12,代码来源:functions.php


示例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 
    }
开发者ID:Giordano-Bruno,项目名称:GiordanoBruno,代码行数:37,代码来源:custom-header.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";
 }
开发者ID:davidHuanghw,项目名称:david_blog,代码行数:31,代码来源:mh-custom-functions.php


示例16: mh_newsdesk_lite_logo

 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";
 }
开发者ID:rafaelnco,项目名称:tiamaria,代码行数:29,代码来源:mh-custom-functions.php


示例17: pu06_custom_header

/**
 * 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>';
    }
}
开发者ID:esrutledge,项目名称:mad-ten-theme,代码行数:11,代码来源:functions.php


示例18: fabric_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 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);
}
开发者ID:nmrugg,项目名称:studiopress-premum-wp-themes,代码行数:12,代码来源:functions.php


示例19: minimum_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 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);
}
开发者ID:nmrugg,项目名称:studiopress-premum-wp-themes,代码行数:12,代码来源:functions.php


示例20: onetone_custom_scripts

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()));
}
开发者ID:Magnacarter,项目名称:livinghope.com,代码行数:35,代码来源:theme-setup.php



注:本文中的get_header_textcolor函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_headers函数代码示例发布时间:2022-05-15
下一篇:
PHP get_header_image函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap