本文整理汇总了PHP中header_image函数的典型用法代码示例。如果您正苦于以下问题:PHP header_image函数的具体用法?PHP header_image怎么用?PHP header_image使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了header_image函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: jeweltheme_polmo_quick_style
function jeweltheme_polmo_quick_style()
{
//$jeweltheme_polmo_banner_image = get_theme_mod('jeweltheme_polmo_banner_image', get_template_directory_uri() . '/images/background/blog.jpg');
$jeweltheme_polmo_subscriber_image = get_theme_mod('jeweltheme_polmo_subscriber_image', get_template_directory_uri() . '/images/background/1.jpg');
?>
<style type="text/css">
<?php
if (get_header_image()) {
?>
.page-head{
background: url("<?php
echo header_image();
?>
") no-repeat center top fixed;
background-size: cover;
}
<?php
}
?>
.subscribe-section {
background: url( "<?php
echo esc_url_raw($jeweltheme_polmo_subscriber_image);
?>
") no-repeat center center fixed;
}
</style>
<?php
}
示例2: header_style
function header_style()
{
?>
<style type="text/css">
#header{
background: url(<?php
header_image();
?>
) no-repeat;
height: <?php
echo HEADER_IMAGE_HEIGHT;
?>
px;
width: <?php
echo HEADER_IMAGE_WIDTH;
?>
px;
}
#header h1 a{color:#<?php
header_textcolor();
?>
;}
</style>
<?php
}
示例3: ipt_kb_admin_header_image
/**
* Custom header image markup displayed on the Appearance > Header admin panel.
*
* @see ipt_kb_custom_header_setup().
*/
function ipt_kb_admin_header_image()
{
?>
<div id="headimg">
<?php
if (get_header_image()) {
?>
<img src="<?php
header_image();
?>
" alt="">
<?php
} else {
?>
<h1 class="displaying-header-text"><a id="name" onclick="return false;" href="<?php
echo esc_url(home_url('/'));
?>
"><?php
bloginfo('name');
?>
</a></h1>
<?php
}
?>
</div>
<?php
}
示例4: 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
}
示例5: header_style
function header_style()
{
?>
<style type="text/css">
#content, #sidebar-1, #sidebar-2, #sidebar-3 {
background-image:url(<?php
header_image();
?>
);
}
<?php
if ('blank' == get_header_textcolor()) {
?>
#hode h4, #hode span {
display: none;
}
<?php
} else {
?>
#hode a, #hode {
color: #<?php
header_textcolor();
?>
;
}
<?php
}
?>
</style>
<?php
}
示例6: prose_custom_header_style
/**
* Styling included at the top of the site page for a custom header.
*
* @author StudioPress
*/
function prose_custom_header_style()
{
if (get_header_image()) {
?>
<!-- custom-header styling --><style type="text/css">
#header{background:url(<?php
header_image();
?>
) scroll no-repeat 0 0;}
<?php
if (get_theme_mod('header_textcolor') && get_theme_mod('header_textcolor') != 'blank') {
?>
#title-area #title a, #title-area #title a:hover{color:#<?php
header_textcolor();
?>
;}
#title-area #description{color: #<?php
header_textcolor();
?>
;}
<?php
}
?>
</style>
<?php
}
}
示例7: SLUG_custom_header
function SLUG_custom_header()
{
?>
<style type="text/css">
#branding {
background: url(<?php
header_image();
?>
);
}
#branding, #branding a, #branding a:hover {
color: #<?php
header_textcolor();
?>
!important;
}
#branding a:hover {
text-decoration: none;
}
#description {
filter: alpha(opacity=60);
opacity: 0.6;
}
</style><?php
}
示例8: softone_header_logo
function softone_header_logo()
{
?>
<div id="logo" <?php
echo $style;
?>
>
<a class="navbar-brand" href="<?php
echo home_url('/');
?>
">
<?php
if (get_header_image()) {
?>
<img src="<?php
header_image();
?>
" alt="" height="50" />
<?php
} else {
?>
<span style="color: #8edb34"><i class="fa fa-leaf"></i> Sof</span>plant
<?php
}
?>
</a>
</div>
<?php
}
示例9: corpobox_admin_header_style
function corpobox_admin_header_style()
{
?>
<style type="text/css">
.appearance_page_custom-header #headimg {
max-height: 250px;
}
#headimg img {
display: block;
margin: 0 auto;
width: 100%;
height: auto;
max-height: 250px;
}
#headimg {
background: <?php
echo esc_attr(get_theme_mod('corpobox_headerbg_color', '#f16272'));
?>
url(<?php
header_image();
?>
) no-repeat 50% 0;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
width: 100%;
height: 250px;
text-align:center;
padding-top:80px;
}
</style>
<?php
}
示例10: header_style
function header_style()
{
?>
<style type="text/css"> header[role=banner] { background: url(<?php
header_image();
?>
); } </style><?php
}
示例11: blogsixteen_customizer_css
function blogsixteen_customizer_css()
{
?>
<style type="text/css">
body { background-color: <?php
echo esc_html(get_theme_mod('blogsixteen_body_color'));
?>
; }
a { color: <?php
echo esc_html(get_theme_mod('blogsixteen_link_color'));
?>
; }
body , .main-navigation ul ul a { color: <?php
echo esc_html(get_theme_mod('blogsixteen_text_color'));
?>
; }
h1,h2,h3,h4,h5 { color: <?php
echo esc_html(get_theme_mod('blogsixteen_headline_color'));
?>
; }
.current_page_item a { color: <?php
echo esc_html(get_theme_mod('blogsixteen_main_color'));
?>
;}
button:hover, input[type="button"]:hover, input[type="reset"]:hover, input[type="submit"]:hover { border-color: <?php
echo esc_html(get_theme_mod('blogsixteen_main_color'));
?>
; background-color: <?php
echo esc_html(get_theme_mod('blogsixteen_main_color'));
?>
; }
.site-title a, .site-description, .main-navigation a { color: <?php
echo esc_html(get_theme_mod('blogsixteen_header_color'));
?>
; }
.site-description:after { border-color: <?php
echo esc_html(get_theme_mod('blogsixteen_header_color'));
?>
; }
#masthead { background-repeat: no-repeat; background-size: cover; background-image: url('<?php
esc_url(header_image());
?>
'); ;}
#masthead { background-color: <?php
echo esc_html(get_theme_mod('blogsixteen_header_background_color'));
?>
; }
.main-navigation { background-color: <?php
echo esc_html(get_theme_mod('blogsixteen_menu_background'));
?>
; }
.current_page_item a, .main-navigation a:focus, .main-navigation a:hover { color: <?php
echo esc_html(get_theme_mod('blogsixteen_menu_color_active'));
?>
; }
</style>
<?php
}
示例12: contango_admin_header_image
/** Styles the header image and text displayed on the blog preview. */
function contango_admin_header_image()
{
?>
<div id="headimg">
<?php
if (get_header_image()) {
?>
<div id="logo-image">
<a href="<?php
echo esc_url(home_url('/'));
?>
" onclick="return false;"><img src="<?php
header_image();
?>
" width="<?php
echo esc_attr(get_custom_header()->width);
?>
" height="<?php
echo esc_attr(get_custom_header()->height);
?>
" alt="<?php
bloginfo('name');
?>
" /></a>
</div><!-- end of #logo -->
<?php
} else {
// header image was removed
?>
<div id="logo-text">
<span class="site-name"><a href="<?php
echo esc_url(home_url('/'));
?>
" onclick="return false;" title="<?php
echo esc_attr(get_bloginfo('name', 'display'));
?>
" rel="home"><?php
bloginfo('name');
?>
</a></span>
<span class="site-description"><?php
bloginfo('description');
?>
</span>
</div><!-- end of #logo -->
<?php
}
// header image was removed (again)
?>
</div>
<?php
}
示例13: shandora_admin_header_image
/**
* Outputs markup to be displayed on the Appearance > Header admin panel.
* This callback overrides the default markup displayed there.
*
* @since Twenty Thirteen 1.0
*/
function shandora_admin_header_image()
{
?>
<div id="headimg" style="background: url(<?php
header_image();
?>
) no-repeat scroll top; background-size: 1240px auto;"></div>
<?php
}
示例14: theme_admin_header_image
function theme_admin_header_image()
{
?>
<div style="display:inline-block;height:50px;background-color:#000;"><img src=<?php
header_image();
?>
height="50px"></div>
<?php
}
示例15: arras_header_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
}