当前位置: 首页>>代码示例>>PHP>>正文


PHP jetpack_has_site_logo函数代码示例

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


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

示例1: storefront_site_branding

    /**
     * Display Site Branding
     * @since  1.0.0
     * @return void
     */
    function storefront_site_branding()
    {
        if (function_exists('jetpack_has_site_logo') && jetpack_has_site_logo()) {
            jetpack_the_site_logo();
        } else {
            ?>
			<div class="site-branding  <?php 
            if (is_home() || is_front_page()) {
                echo 'homepage';
            }
            ?>
">
				<h1 class="site-title" style="display:none;"><a href="<?php 
            echo esc_url(home_url('/'));
            ?>
" rel="home"><?php 
            bloginfo('name');
            ?>
</a></h1>
				<p class="site-description" style="display:none;"><?php 
            bloginfo('description');
            ?>
</p>
				<img src="<?php 
            echo get_template_directory_uri();
            ?>
/images/logo.png" alt="">
			</div>
		<?php 
        }
    }
开发者ID:baydiwo,项目名称:RajutanIbu,代码行数:36,代码来源:header.php

示例2: storefront_site_branding

    /**
     * Display Site Branding
     * @since  1.0.0
     * @return void
     */
    function storefront_site_branding()
    {
        if (function_exists('jetpack_has_site_logo') && jetpack_has_site_logo()) {
            jetpack_the_site_logo();
        } else {
            ?>
			<div class="site-branding">
				<h1 class="site-title"><a href="<?php 
            echo esc_url(home_url('/'));
            ?>
"
				                          rel="home"><?php 
            bloginfo('name');
            ?>
</a></h1>
				<?php 
            if ('' != get_bloginfo('description')) {
                ?>
					<p class="site-description"><?php 
                echo bloginfo('description');
                ?>
</p>
				<?php 
            }
            ?>
			</div>
		<?php 
        }
    }
开发者ID:alexgomes09,项目名称:topshop,代码行数:34,代码来源:header.php

示例3: genlib_has_logo

/**
 * Determine if a site logo is assigned or not.
 *
 * @since  0.1.0
 * @uses   GenLib_Site_Logo::has_site_logo
 * @return boolean True if there is an active logo, false otherwise
 */
function genlib_has_logo()
{
    if (class_exists('GenLib_Site_Logo', false)) {
        return genlib_class('site-logo')->has_site_logo();
    }
    if (function_exists('jetpack_the_site_logo')) {
        return jetpack_has_site_logo();
    }
}
开发者ID:robneu,项目名称:genlib,代码行数:16,代码来源:template-tags.php

示例4: flagship_has_logo

/**
 * Determine if a site logo is assigned or not.
 *
 * @since  1.1.0
 * @uses   Flagship_Site_Logo::has_site_logo
 * @return boolean True if there is an active logo, false otherwise
 */
function flagship_has_logo()
{
    if (!class_exists('Flagship_Site_Logo', false)) {
        if (function_exists('jetpack_the_site_logo')) {
            return jetpack_has_site_logo();
        }
        if (function_exists('the_site_logo')) {
            return has_site_logo();
        }
        return null;
    }
    return flagship_library()->site_logo->has_site_logo();
}
开发者ID:flagshipwp,项目名称:flagship-library,代码行数:20,代码来源:template-general.php

示例5: storefront_site_branding

    /**
     * Display Site Branding
     * @since  1.0.0
     * @return void
     */
    function storefront_site_branding()
    {
        if (function_exists('jetpack_has_site_logo') && jetpack_has_site_logo()) {
            jetpack_the_site_logo();
        } else {
            $url = home_url('/');
            ?>
			<div class="site-branding">
			<img id="logo" src="/wp_development/content/plugins/rettner-plugin/new/images/uofrlogo.png">
			</div>
		<?php 
        }
    }
开发者ID:karyband,项目名称:Rettner-Website,代码行数:18,代码来源:headernew.php

示例6: sketch_body_classes

/**
 * Adds custom classes to the array of body classes.
 *
 * @param array $classes Classes for the body element.
 * @return array
 */
function sketch_body_classes($classes)
{
    // Adds a class of group-blog to blogs with more than 1 published author.
    if (is_multi_author()) {
        $classes[] = 'group-blog';
    }
    if (function_exists('jetpack_has_site_logo') && jetpack_has_site_logo()) {
        $classes[] = 'has-site-logo';
    }
    if (!is_active_sidebar('sidebar-1')) {
        $classes[] = 'no-sidebar';
    }
    return $classes;
}
开发者ID:petrofcikmatus,项目名称:wp-blog,代码行数:20,代码来源:extras.php

示例7: zorkish_body_classes

/**
Adds custom classes to the array of body classes.
@param array $classes Classes for the body element.
@return array
*/
function zorkish_body_classes($classes)
{
    // Adds a class of group-blog to blogs with more than 1 published author.
    if (is_multi_author()) {
        $classes[] = 'group-blog';
    }
    if ('full' == get_post_meta(get_the_ID(), 'display', true)) {
        $classes[] = 'zk-full';
    }
    if ((!function_exists('jetpack_the_site_logo') || !jetpack_has_site_logo()) && get_theme_mod('zorkish_logo')) {
        $classes[] = 'has-site-logo';
    }
    return $classes;
}
开发者ID:tlongren,项目名称:zorkish,代码行数:19,代码来源:extras.php

示例8: jetpack_the_site_logo

/**
 * Output an <img> tag of the site logo, at the size specified
 * in the theme's add_theme_support() declaration.
 *
 * @uses Site_Logo::logo
 * @uses Site_Logo::theme_size()
 * @uses jetpack_has_site_logo()
 * @uses jetpack_is_customize_preview()
 * @uses esc_url()
 * @uses home_url()
 * @uses esc_attr()
 * @uses wp_get_attachment_image()
 * @uses apply_filters()
 * @since 1.0
 */
function jetpack_the_site_logo()
{
    $logo = site_logo()->logo;
    $size = site_logo()->theme_size();
    $html = '';
    // If no logo is set, but we're in the Customizer, leave a placeholder (needed for the live preview).
    if (!jetpack_has_site_logo()) {
        if (jetpack_is_customize_preview()) {
            $html = sprintf('<a href="%1$s" class="site-logo-link" style="display:none;"><img class="site-logo" data-size="%2$s" /></a>', esc_url(home_url('/')), esc_attr($size));
        }
    } else {
        $html = sprintf('<a href="%1$s" class="site-logo-link" rel="home" itemprop="url">%2$s</a>', esc_url(home_url('/')), wp_get_attachment_image($logo['id'], $size, false, array('class' => "site-logo attachment-{$size}", 'data-size' => $size, 'itemprop' => "logo")));
    }
    echo apply_filters('jetpack_the_site_logo', $html, $logo, $size);
}
开发者ID:dtekcth,项目名称:datateknologer.se,代码行数:30,代码来源:functions.php

示例9: jetpack_the_site_logo

/**
 * Output an <img> tag of the site logo, at the size specified
 * in the theme's add_theme_support() declaration.
 *
 * @uses Site_Logo::logo
 * @uses Site_Logo::theme_size()
 * @uses jetpack_has_site_logo()
 * @uses jetpack_is_customize_preview()
 * @uses esc_url()
 * @uses home_url()
 * @uses esc_attr()
 * @uses wp_get_attachment_image()
 * @uses apply_filters()
 * @since 1.0
 */
function jetpack_the_site_logo()
{
    $logo = site_logo()->logo;
    $size = site_logo()->theme_size();
    // Bail if no logo is set. Leave a placeholder if we're in the Customizer, though (needed for the live preview).
    if (!jetpack_has_site_logo()) {
        if (jetpack_is_customize_preview()) {
            printf('<a href="%1$s" class="site-logo-link" style="display:none;"><img class="site-logo" data-size="%2$s" /></a>', esc_url(home_url('/')), esc_attr($size));
        }
        return;
    }
    // We have a logo. Logo is go.
    $html = sprintf('<a href="%1$s" class="site-logo-link" rel="home">%2$s</a>', esc_url(home_url('/')), wp_get_attachment_image($logo['id'], $size, false, array('class' => "site-logo attachment-{$size}", 'data-size' => $size)));
    echo apply_filters('jetpack_the_site_logo', $html, $logo, $size);
}
开发者ID:sdh100shaun,项目名称:pantheon,代码行数:30,代码来源:functions.php

示例10: ultra_display_logo

 /**
  * Display the logo.
  */
 function ultra_display_logo()
 {
     $logo = siteorigin_setting('header_logo');
     $logo = apply_filters('ultra_logo_image_id', $logo);
     if (empty($logo)) {
         if (function_exists('jetpack_the_site_logo') && jetpack_has_site_logo()) {
             // We'll let Jetpack handle things
             jetpack_the_site_logo();
             return;
         }
         // Just display the site title
         $logo_html = '<h1 class="site-title">' . get_bloginfo('name') . '</h1>';
         $logo_html = apply_filters('ultra_logo_text', $logo_html);
     } else {
         // Load the logo image
         if (is_array($logo)) {
             list($src, $height, $width) = $logo;
         } else {
             $image = wp_get_attachment_image_src($logo, 'full');
             $src = $image[0];
             $height = $image[2];
             $width = $image[1];
         }
         // Add all the logo attributes
         $logo_attributes = apply_filters('ultra_logo_image_attributes', array('src' => $src, 'width' => round($width), 'height' => round($height), 'alt' => sprintf(__('%s Logo', 'ultra'), get_bloginfo('name'))));
         if (siteorigin_setting('header_sticky') && siteorigin_setting('header_scale')) {
             $logo_attributes['data-scale'] = '1';
         }
         $logo_attributes_str = array();
         if (!empty($logo_attributes)) {
             foreach ($logo_attributes as $name => $val) {
                 if (empty($val)) {
                     continue;
                 }
                 $logo_attributes_str[] = $name . '="' . esc_attr($val) . '" ';
             }
         }
         $logo_html = apply_filters('ultra_logo_image', '<img ' . implode(' ', $logo_attributes_str) . ' />');
     }
     // Echo the image
     echo apply_filters('ultra_logo_html', $logo_html);
 }
开发者ID:craighays,项目名称:wpcraighays,代码行数:45,代码来源:template-tags.php

示例11: jetpack_the_site_logo

/**
 * Output an <img> tag of the site logo, at the size specified
 * in the theme's add_theme_support() declaration.
 *
 * @uses Site_Logo::logo
 * @uses Site_Logo::theme_size()
 * @uses jetpack_has_site_logo()
 * @uses jetpack_is_customize_preview()
 * @uses esc_url()
 * @uses home_url()
 * @uses esc_attr()
 * @uses wp_get_attachment_image()
 * @uses apply_filters()
 * @since 1.0
 */
function jetpack_the_site_logo()
{
    $logo = site_logo()->logo;
    $size = site_logo()->theme_size();
    $html = '';
    // If no logo is set, but we're in the Customizer, leave a placeholder (needed for the live preview).
    if (!jetpack_has_site_logo()) {
        if (jetpack_is_customize_preview()) {
            $html = sprintf('<a href="%1$s" class="site-logo-link" style="display:none;"><img class="site-logo" data-size="%2$s" /></a>', esc_url(home_url('/')), esc_attr($size));
        }
    } else {
        $html = sprintf('<a href="%1$s" class="site-logo-link" rel="home" itemprop="url">%2$s</a>', esc_url(home_url('/')), wp_get_attachment_image($logo['id'], $size, false, array('class' => "site-logo attachment-{$size}", 'data-size' => $size, 'itemprop' => "logo")));
    }
    /**
     * Filter the Site Logo output.
     *
     * @since 3.2.0
     *
     * @param string $html Site Logo HTML output.
     * @param array $logo Array of Site Logo details.
     * @param string $size Size specified in add_theme_support declaration, or 'thumbnail' default.
     */
    echo apply_filters('jetpack_the_site_logo', $html, $logo, $size);
}
开发者ID:style55,项目名称:jetpack,代码行数:39,代码来源:functions.php

示例12: esc_url

			<?php 
    }
    ?>

		</header>
	<?php 
}
?>

	<!-- TODO customizer setting for fixed drawer -->

	<div class="mdl-layout__drawer">
    <span class="site-title mdl-layout-title">

			<?php 
if (function_exists('jetpack_has_site_logo') && jetpack_has_site_logo()) {
    ?>
				<img src="<?php 
    echo esc_url(jetpack_get_site_logo('url'));
    ?>
" alt="<?php 
    echo esc_attr(get_bloginfo('name'));
    ?>
" class="site-logo">
			<?php 
}
?>

			<a href="<?php 
echo esc_url(home_url('/'));
?>
开发者ID:peiche,项目名称:_smdl,代码行数:31,代码来源:header.php

示例13: woa_sf_layout_adjustments

    /**
     * Layout
     * Adjusts the default Storefront layout when the plugin is active
     */
    public function woa_sf_layout_adjustments()
    {
        $check = get_theme_mod('woa_sf_enable_logo', 'title_tagline');
        $logo = get_theme_mod('woa_sf_logo', null);
        if (($check == 'logo_img' || $check == 'logo_img_tagline') && $logo) {
            if (is_ssl()) {
                $logo = str_replace('http://', 'https://', $logo);
            }
            ?>
			<div class="site-branding site-logo-anchor">
				<a href="<?php 
            bloginfo('url');
            ?>
">
					<img src="<?php 
            echo $logo;
            ?>
" style="display:inline-block;">
				</a>
				<?php 
            if ($check == 'logo_img_tagline') {
                ?>
					<p class="site-description"><?php 
                bloginfo('description');
                ?>
</p>
				<?php 
            }
            ?>
			</div>
		<?php 
        } else {
            if (function_exists('jetpack_has_site_logo') && jetpack_has_site_logo()) {
                jetpack_the_site_logo();
            } else {
                ?>
			<div class="site-branding">
				<h1 class="site-title"><a href="<?php 
                echo esc_url(home_url('/'));
                ?>
" rel="home"><?php 
                bloginfo('name');
                ?>
</a></h1>
				<p class="site-description"><?php 
                bloginfo('description');
                ?>
</p>
			</div>
		<?php 
            }
        }
    }
开发者ID:bailoo,项目名称:DagnaMusicWP,代码行数:57,代码来源:storefront-site-logo.php

示例14: jinn_the_site_logo

            
	<header id="masthead" class="group site-header title-bar top-bar" role="banner" data-sticky data-options="marginTop:0;" style="width:100%" data-top-anchor="masthead" data-btm-anchor="colophon:bottom">
            
            <div class="row"> <!-- Start Foundation row -->
                
                <div class="top-bar-title">
<!--                    <div class="title-bar" data-responsive-toggle="example-menu" data-hide-for="large">
                    <button class="menu-icon" type="button" data-toggle></button>
                    <div class="title-bar-title">Menu</div>
                    </div>-->
                    <div class="site-branding">
                    <?php 
if (has_custom_logo() || jetpack_has_site_logo()) {
    jinn_the_site_logo();
}
if (!has_custom_logo() && !jetpack_has_site_logo() || has_custom_logo() && get_theme_mod('show_logo_sitename') === true) {
    ?>
                    
                                <?php 
    if (is_front_page() || is_home() || is_page_template('page-templates/frontpage-portfolio.php')) {
        ?>
                                    <h1 class="site-title"><a href="<?php 
        echo esc_url(home_url('/'));
        ?>
" rel="home"><?php 
        bloginfo('name');
        ?>
</a></h1>
                                <?php 
    } else {
        ?>
开发者ID:jekkilekki,项目名称:theme-jin,代码行数:30,代码来源:header.php

示例15: storefront_site_branding

/**
 *
 */
function storefront_site_branding()
{
    $is_logo = pbosfc_get_option('site_logo');
    $logo_uri = pbosfc_get_option('site_logo_image');
    if ($is_logo && $logo_uri) {
        if (is_ssl()) {
            $logo_uri = str_replace('http://', 'https://', $logo_uri);
        }
        ?>
		<div class="site-logo-anchor">
			<a href="<?php 
        bloginfo('url');
        ?>
"><img src="<?php 
        echo esc_html($logo_uri);
        ?>
" style="display:inline-block;"></a>
		</div>
		<?php 
    } else {
        if (function_exists('jetpack_has_site_logo') && jetpack_has_site_logo()) {
            jetpack_the_site_logo();
        } else {
            ?>
		<div class="site-branding">
			<h1 class="site-title"><a href="<?php 
            echo esc_url(home_url('/'));
            ?>
"
			                          rel="home"><?php 
            bloginfo('name');
            ?>
</a></h1>
			<?php 
            if ('' != get_bloginfo('description')) {
                ?>
				<p class="site-description"><?php 
                echo bloginfo('description');
                ?>
</p>
			<?php 
            }
            ?>
		</div>
	<?php 
        }
    }
}
开发者ID:boguslawski-piotr,项目名称:pbo-storefront-compact,代码行数:51,代码来源:header.php


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