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

PHP get_header_image函数代码示例

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

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



在下文中一共展示了get_header_image函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: popper_customize_css

/**
 * Inject Customizer CSS when appropriate
 */
function popper_customize_css()
{
    $header_color = get_theme_mod('header_color');
    if ($header_color && $header_color != "#000000") {
        ?>
         <style type="text/css">
             .site-header {
				 background-color:<?php 
        echo $header_color;
        ?>
;
			 }
         </style>
    <?php 
    }
    if ($header_color == '#ffffff' && !get_header_image()) {
        ?>
		<style type="text/css">
			.main-navigation {
				background-color: transparent;
			}

			@media screen and (min-width: 50em) {

				.main-navigation.toggled {
					background-color: transparent;
				}

				.main-navigation a,
				.main-navigation a:hover,
				.main-navigation a:focus,
				.dropdown-toggle {
					color: #000;
					outline-color: #000;
				}

				.dropdown-toggle {
					background-color: transparent;
				}

				.dropdown-toggle:hover,
				.dropdown-toggle:focus {
					background-color: #fff;
					outline: 1px solid #000;
				}

				.main-navigation ul ul a,
				ul ul .dropdown-toggle {
					color: #fff;
				}

				.main-navigation ul ul a:hover,
				.main-navigation ul ul a:focus {
					outline-color: #B3B3B3;
				}
			}
		</style>
	<?php 
    }
}
开发者ID:gabtio,项目名称:popper,代码行数:63,代码来源:customizer.php


示例2: kkthemes_archive_title

function kkthemes_archive_title()
{
    $tag_style = '';
    $header_image = get_header_image();
    if (!empty($header_image)) {
        $tag_style = 'background-image: url(' . esc_url($header_image) . ');';
    }
    ?>
	<div class="uk-panel uk-panel-box uk-panel-space uk-text-large uk-text-center tm-branded-panel uk-margin-large-bottom" style="<?php 
    echo $tag_style;
    ?>
">
		<h1 class="uk-article-title" itemprop="headline">
			<?php 
    single_cat_title('') || post_type_archive_title('');
    ?>
		</h1>
		<?php 
    if (is_featured_item()) {
        $post_type = get_post_type();
        echo '<p>' . get_post_type_object($post_type)->description . '</p>';
    } else {
        echo category_description();
    }
    ?>
	</div>
<?php 
}
开发者ID:kkthemes,项目名称:kkthemes,代码行数:28,代码来源:index.php


示例3: ashford_header_style

/**
 * Add custom header (not mobi)
 *
 * v2.2 fixed header height issue
 * 
 * @author Tim Bednar 
 * @version v2.0
 * @since v2.0
*/
function ashford_header_style()
{
    global $ashfordtheme;
    if (isset($ashfordtheme->option['display_blog_name'])) {
        $display_blog_name = $ashfordtheme->option['display_blog_name'];
    } else {
        // display custom header by default
        $display_blog_name = 'titleoff';
    }
    $ashford_logo_height = '100px';
    if (isset($ashfordtheme->option['logo_height'])) {
        if ($ashfordtheme->option['logo_height'] != '') {
            $ashford_logo_height = $ashfordtheme->option['logo_height'];
        }
    }
    $header_image = get_header_image();
    if (!empty($header_image) && $display_blog_name == 'titleoff' && IS_MOBI == 'false') {
        ?>
<style type="text/css">#blog_logo{background-image:url(<?php 
        header_image();
        ?>
);background-repeat:no-repeat;backgroud-position:top left;height:<?php 
        echo $ashford_logo_height;
        ?>
;padding:0px}</style><?php 
    }
}
开发者ID:marqui678,项目名称:finalchance.Panopta,代码行数:36,代码来源:ashford_functions.php


示例4: add_styles

/**
 * Add header image to css
 * Allow the use of admin defined header image
 *
 * TODO : use different image for each screen size
 */
function add_styles()
{
    ?>
	<style type="text/css">
	@media (max-width: 512px)  and (min-resolution: 1.5dppx),
       (max-width: 1024px) and (max-resolution: 1.5dppx) {
	 	body::before {
	    background-image: url('<?php 
    echo get_header_image();
    ?>
');
	  }
	}
	@media (min-width: 513px)  and (max-width: 1024px) and (min-resolution: 1.5dppx),
	       (min-width: 1025px) and (max-width: 2048px) and (max-resolution: 1.5dppx)  {
	  body::before {
	    background-image: url('<?php 
    echo get_header_image();
    ?>
');
	  }
	}
	@media (min-width: 1025px) and (min-resolution: 1.5dppx),
	       (min-width: 2049px) and (max-resolution: 1.5dppx) {
	  body::before {
	    background-image: url('<?php 
    echo get_header_image();
    ?>
');
	  }
	}
	</style>
	<?php 
}
开发者ID:Heyfara,项目名称:wordpress-mdl,代码行数:40,代码来源:functions.php


示例5: argent_header_background

/**
 * Add custom header image to header area
 */
function argent_header_background()
{
    if (get_header_image()) {
        $css = '.site-branding { background-image: url(' . esc_url(get_header_image()) . '); }';
        wp_add_inline_style('argent-style', $css);
    }
}
开发者ID:CoordCulturaDigital-Minc,项目名称:Novo-SNIIC,代码行数:10,代码来源:template-tags.php


示例6: training_wpo_layout_breadcrumbs_bg

/**
 * Customize Breadcrumd with Background Color Or Background Images
 */
function training_wpo_layout_breadcrumbs_bg()
{
    $customize_image = get_header_image();
    if (isset($trainingconfig['background_breadcrumb']) && $trainingconfig['background_breadcrumb']) {
        switch ($trainingconfig['background_breadcrumb']) {
            case 'bg_image':
                $style = 'background-image: url(' . esc_url_raw($trainingconfig['image_breadcrumb']) . ');';
                break;
            case 'bg_color':
                $style = 'background-color:' . esc_attr($trainingconfig['bg_color']);
                break;
            case 'global':
                if ($customize_image) {
                    $style = "background: url('" . esc_url_raw($customize_image) . "') no-repeat center center #f9f9f9";
                    break;
                }
            default:
                $style = "background: url('" . get_template_directory_uri() . "/images/breadcrumb.jpg') no-repeat center center #f9f9f9";
                break;
        }
    } elseif (isset($customize_image) && !empty($customize_image)) {
        $style = "background: url('" . esc_url_raw($customize_image) . "') no-repeat center center #f9f9f9";
    } else {
        $style = "background: url('" . get_template_directory_uri() . "/images/breadcrumb.jpg') no-repeat center center #f9f9f9";
    }
    return $style;
}
开发者ID:morganloehr,项目名称:chris-verna,代码行数:30,代码来源:layout-hooks.php


示例7: colormag_render_header_image

    /**
     * Shows the small info text on top header part
     */
    function colormag_render_header_image()
    {
        $header_image = get_header_image();
        if (!empty($header_image)) {
            if (get_theme_mod('colormag_header_image_link', 0) == 1) {
                ?>
		<a href="<?php 
                echo esc_url(home_url('/'));
                ?>
" title="<?php 
                echo esc_attr(get_bloginfo('name', 'display'));
                ?>
" rel="home">
		<?php 
            }
            ?>
		<div class="header-image-wrap"><img src="http://thevrforums.com/images/banner.png" class="header-image" width="<?php 
            echo get_custom_header()->width;
            ?>
" height="<?php 
            echo get_custom_header()->height;
            ?>
" alt="<?php 
            echo esc_attr(get_bloginfo('name', 'display'));
            ?>
"></div>
	<?php 
            if (get_theme_mod('colormag_header_image_link', 0) == 1) {
                ?>
		</a>
		<?php 
            }
        }
    }
开发者ID:sammykumar,项目名称:TheVRForums,代码行数:37,代码来源:header-functions.php


示例8: xsbf_body_classes

 function xsbf_body_classes($classes)
 {
     // Adds a class of group-blog to blogs with more than 1 published author
     if (is_multi_author()) {
         $classes[] = 'group-blog';
     }
     // Adds classes for various sizes of featured images. Our theme overrides the
     // custom header with a large featured image.
     if (has_post_thumbnail()) {
         $classes[] = 'featured-image';
         global $post, $content_width;
         $featured_image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'full');
         $image_width = $featured_image[1];
         if ($content_width and $image_width >= $content_width) {
             if (is_home()) {
                 $classes[] = 'has-cover-image';
             } else {
                 $classes[] = 'has-section-image';
             }
             //endif is_home
         }
         //endif $content_width
         // If custom header and not overridden, then add class for that
     } elseif (get_header_image()) {
         $classes[] = 'has-header-image';
     }
     //endif has_post_thumbnail
     return $classes;
 }
开发者ID:vedcraft,项目名称:vedcraft-theme,代码行数:29,代码来源:extras.php


示例9: 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


示例10: 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 
    }
}
开发者ID:nmrugg,项目名称:studiopress-premum-wp-themes,代码行数:32,代码来源:custom-header.php


示例11: 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


示例12: the_header

    function the_header()
    {
        $text = '';
        $image = get_header_image();
        $text = '
			<div id="site-heading">
				<h1 class="site-title"><a href="' . esc_url(home_url('/')) . '">' . get_bloginfo('name') . '</a></h1>
				<div class="site-description">' . get_bloginfo('description') . '</div>
			</div>';
        if ($image) {
            $image = '<img src="' . esc_url($image) . '" />';
            if (!display_header_text()) {
                $image = '<a href="' . esc_url(home_url('/')) . '">' . $image . '</a>';
            }
            $image = '<div id="site-image">' . $image . '</div>';
        }
        // Allow plugins/themes to override the default header.
        $output = apply_filters('fastfood_header', $text . $image);
        ?>

			<div id="site-header" role="banner">

				<?php 
        echo $output;
        ?>

			</div>

		<?php 
    }
开发者ID:TwoBeers,项目名称:fastfood,代码行数:30,代码来源:custom-header.php


示例13: 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


示例14: handle

    /**
     * Handles shortcode
     * @param $atts
     * @param null $content
     * @return string
     */
    public function handle($atts, $content = null)
    {
        extract(shortcode_atts($this->extractShortcodeAttributes($atts), $atts));
        $breadcrumbsHtml = '';
        if ($breadcrumbs == 'yes') {
            $breadcrumbsHtml = wp_nav_menu(array('container' => 'none', 'theme_location' => 'breadcrumbs', 'walker' => new ctBreadCrumbWalker(), 'echo' => false, 'items_wrap' => '%3$s'));
            $breadcrumbsHtml = $breadcrumbsHtml ? '<div class="breadcrumbs">

													            <div class="breadcrumbs-inner">
													                ' . $breadcrumbsHtml . '
													            </div>

													</div>' : '';
        }
        $id = $id ? ' id="' . $id . '"' : '';
        $html = $header ? '<header' . $id . ' style="background-image: url(' . get_header_image() . ')">



							                <h3 class="hdr1">' . $header . '</h3>



							</header>' : '';
        $html .= $breadcrumbsHtml;
        return $html;
    }
开发者ID:clevervaughn,项目名称:dottiesbiscuitbarn,代码行数:33,代码来源:ctTitleRowShortcode.class.php


示例15: 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


示例16: 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


示例17: 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 
    }
开发者ID:andychoi,项目名称:k-knowledgebase-theme-wp,代码行数:32,代码来源:custom-header.php


示例18: 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


示例19: warrior_enqueue_scripts

 function warrior_enqueue_scripts()
 {
     global $pagenow;
     // Only load these scripts on frontend
     if (!is_admin() && $pagenow != 'wp-login.php') {
         // Load all Javascript files
         wp_enqueue_script('jquery');
         if (is_singular()) {
             wp_enqueue_script('comment-reply');
         }
         wp_enqueue_script('jquery-floating-placeholder', get_template_directory_uri() . '/js/jquery-floating-placeholder.min.js', '', null, true);
         wp_enqueue_script('justifiedGallery', get_template_directory_uri() . '/js/jquery.justifiedGallery.min.js', '', '3.5.1', true);
         wp_enqueue_script('backstretch', get_template_directory_uri() . '/js/jquery.backstretch.min.js', '', null, true);
         wp_enqueue_script('owlcarousel', get_template_directory_uri() . '/js/owl.carousel.min.js', '', '1.1', true);
         wp_enqueue_script('fitvids', get_template_directory_uri() . '/js/jquery.fitvids.js', '', '1.1', true);
         wp_enqueue_script('slicknav', get_template_directory_uri() . '/js/jquery.slicknav.min.js', '', '1.0.3', true);
         wp_enqueue_script('mobilemenu', get_template_directory_uri() . '/js/jquery.mobilemenu.js', '', '1.1', true);
         wp_enqueue_script('functions', get_template_directory_uri() . '/js/functions.js', '', null, true);
         // Localize script
         wp_localize_script('functions', '_warrior', array('bg_header' => esc_url(get_header_image())));
         // Load all CSS files
         wp_enqueue_style('reset', get_template_directory_uri() . '/css/reset.css', array(), false, 'all');
         wp_enqueue_style('justifiedGallery', get_template_directory_uri() . '/css/justifiedGallery.min.css', array(), false, 'all');
         wp_enqueue_style('linecons', get_template_directory_uri() . '/css/linecons.css', array(), false, 'all');
         wp_enqueue_style('zocial', get_template_directory_uri() . '/css/zocial.css', array(), false, 'all');
         wp_enqueue_style('owlcarousel', get_template_directory_uri() . '/css/owl.carousel.css', array(), false, 'all');
         wp_enqueue_style('slicknav', get_template_directory_uri() . '/css/slicknav.min.css', array(), false, 'all');
         wp_enqueue_style('style', get_template_directory_uri() . '/style.css', array(), false, 'all');
         wp_enqueue_style('responsive', get_template_directory_uri() . '/css/responsive.css', array(), false, 'all');
         // Load custom CSS file
         wp_enqueue_style('custom', get_template_directory_uri() . '/custom.css', array(), false, 'screen');
     }
 }
开发者ID:TakenCdosG,项目名称:chefs_blog,代码行数:33,代码来源:theme-styles.php


示例20: cc_add_header_image

function cc_add_header_image()
{
    global $post;
    $header_image = get_header_image();
    $custom_header_image = get_custom_header();
    /*echo '<!-- debug: header_image ' . print_r( array('header_image' => $header_image, 'custom_header_image' => $custom_header_image ), true ). ' -->';*/
    if (!empty($header_image)) {
        ?>
	<div class="cc-header-image">	
		<a class="cc-header-image-link" href="<?php 
        echo esc_url(home_url('/'));
        ?>
" title="<?php 
        echo esc_attr(get_bloginfo('name', 'display'));
        ?>
" rel="home">
			<img src="<?php 
        echo $header_image;
        ?>
" width="<?php 
        echo $custom_header_image->width;
        ?>
" height="<?php 
        echo $custom_header_image->height;
        ?>
" alt="">
		</a>
	</div>	
	<?php 
    }
}
开发者ID:igniterealtime,项目名称:community-plugins,代码行数:31,代码来源:template-tags.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP get_header_textcolor函数代码示例发布时间:2022-05-15
下一篇:
PHP get_header_host_table函数代码示例发布时间: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