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


PHP bloginfo函数代码示例

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


在下文中一共展示了bloginfo函数的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">
				<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

示例2: siteorigin_north_display_logo

    /**
     * Display the logo or site title
     */
    function siteorigin_north_display_logo()
    {
        $logo = siteorigin_setting('branding_logo');
        if (!empty($logo)) {
            $logo_id = attachment_url_to_postid($logo);
            $attrs = apply_filters('siteorigin_north_logo_attributes', array());
            ?>
<a href="<?php 
            echo esc_url(home_url('/'));
            ?>
" rel="home"><?php 
            echo wp_get_attachment_image($logo_id, 'full', false, $attrs);
            ?>
</a><?php 
        } else {
            ?>
<h1 class="site-title"><a href="<?php 
            echo esc_url(home_url('/'));
            ?>
" rel="home"><?php 
            bloginfo('name');
            ?>
</a></h1><?php 
        }
    }
开发者ID:adiraomj,项目名称:siteorigin-north,代码行数:28,代码来源:template-tags.php

示例3: vicuna_global_navigation

function vicuna_global_navigation()
{
    $options = get_option('vicuna_config');
    if ($options['g_navi']) {
        ?>
	<ul id="globalNavi">
<?php 
        if ($options['g_navi_home']) {
            ?>
		<li><a href="<?php 
            bloginfo('home');
            ?>
" title="Home">Home</a></li>
<?php 
        }
        if ($options['g_navi'] == 1) {
            wp_list_pages('sort_column=menu_order&title_li=0&depth=1');
        } else {
            if ($options['g_navi'] == 2) {
                wp_list_categories('title_li=0&hierarchical=0');
            }
        }
        ?>
	</ul>
<?php 
    }
}
开发者ID:nakaji0213,项目名称:wp.vicuna.ext,代码行数:27,代码来源:config.php

示例4: widget_springloaded_search

function widget_springloaded_search()
{
    ?>
<div class="side-widget">
  <h3><?php 
    _e('Search');
    ?>
</h3>  
	<form method="get" action="<?php 
    bloginfo('url');
    ?>
/">
<p><input type="text" name="s" onblur="this.value=(this.value=='') ? '<?php 
    _e('Search this Blog', 'springloaded');
    ?>
' : this.value;" onfocus="this.value=(this.value=='<?php 
    _e('Search this Blog', 'springloaded');
    ?>
') ? '' : this.value;" value="<?php 
    _e('Search this Blog', 'springloaded');
    ?>
" id="s" /> <input type="submit" name="submit" value="Search" id="some_name"></p>
	</form>
</div>
<?php 
}
开发者ID:rmccue,项目名称:wordpress-unit-tests,代码行数:26,代码来源:functions.php

示例5: childtheme_logo

/**
 * the actual logo adding function
 */
function childtheme_logo()
{
    global $my_shortname;
    $logo = get_option($my_shortname . '_logo');
    if (!empty($logo)) {
        ?>
		<a id="logo" href="<?php 
        bloginfo('url');
        ?>
/" title="<?php 
        bloginfo('name');
        ?>
" rel="home"><img src="<?php 
        bloginfo('stylesheet_directory');
        ?>
/scripts/timthumb.php?src=<?php 
        echo $logo;
        ?>
&amp;w=55&amp;zc=1" alt="<?php 
        bloginfo('name');
        ?>
" /></a>
		<?php 
    }
}
开发者ID:jentanbernardus,项目名称:Thematic-html5boilerplate,代码行数:28,代码来源:admin-panel-functions.php

示例6: widget_andreas01_pagenav

function widget_andreas01_pagenav()
{
    ?>
<h2 class="hide">Site menu:</h2>
<ul class="page">
<?php 
    if (is_page()) {
        $highlight = "page_item";
    } else {
        $highlight = "page_item current_page_item";
    }
    ?>
<li class="<?php 
    echo $highlight;
    ?>
"><a href="<?php 
    bloginfo('url');
    ?>
">Home</a></li>
<?php 
    wp_list_pages('sort_column=menu_order&depth=1&title_li=');
    ?>
</ul>
<?php 
}
开发者ID:jeremylightsmith,项目名称:blog,代码行数:25,代码来源:functions.php

示例7: wpbss_header_widgets_1_callback

    /**
     * Add block for header if no widgets 1
     */
    function wpbss_header_widgets_1_callback()
    {
        if (get_theme_mod('logo')) {
            ?>
	        <a href="<?php 
            echo esc_url(home_url('/'));
            ?>
" rel="home">
	            <img src="<?php 
            echo get_theme_mod('logo');
            ?>
"  class="img-responsive" alt="" />
	        </a>
	    <?php 
        } else {
            // End header image check.
            ?>
	       <h1 class="site-title"><a href="<?php 
            echo esc_url(home_url('/'));
            ?>
" rel="home"><?php 
            bloginfo('name');
            ?>
</a></h1>
	       <strong class="site-description"><?php 
            bloginfo('description');
            ?>
</strong>
	    <?php 
        }
        // End header image check.
    }
开发者ID:systemo-biz,项目名称:wpbss-u3,代码行数:35,代码来源:header3bar.php

示例8: woo_IE_head

    function woo_IE_head()
    {
        ?>
	
<!--[if IE 6]>
<script type="text/javascript" src="<?php 
        bloginfo('template_directory');
        ?>
/includes/js/pngfix.js"></script>
<script type="text/javascript" src="<?php 
        bloginfo('template_directory');
        ?>
/includes/js/menu.js"></script>
<link rel="stylesheet" type="text/css" media="all" href="<?php 
        bloginfo('template_directory');
        ?>
/css/ie6.css" />
<![endif]-->	

<!--[if IE 7]>
<link rel="stylesheet" type="text/css" media="all" href="<?php 
        bloginfo('template_directory');
        ?>
/css/ie7.css" />
<![endif]-->

<!--[if IE 8]>
<link rel="stylesheet" type="text/css" media="all" href="<?php 
        bloginfo('template_directory');
        ?>
/css/ie8.css" />
<![endif]-->
	<?php 
    }
开发者ID:marcus7777,项目名称:eh-theme,代码行数:34,代码来源:theme-actions.php

示例9: skeleton_og_meta_tags

    /**
     * Display the Open Graph meta tags.
     * Add more to this if needed.
     *
     * See: https://developers.facebook.com/docs/sharing/webmasters and http://ogp.me/
     */
    function skeleton_og_meta_tags()
    {
        if (is_single() || is_page()) {
            if (have_posts()) {
                while (have_posts()) {
                    the_post();
                    ?>
        <meta name="og:description" content="<?php 
                    the_excerpt_rss();
                    ?>
">
        <meta name="og:image" content="<?php 
                    echo skeleton_get_thumbnail_src(get_post_thumbnail_id());
                    ?>
">
    <?php 
                }
            }
        } elseif (is_home()) {
            ?>
        <meta name="og:description" content="<?php 
            bloginfo('description');
            ?>
">
    <?php 
        }
    }
开发者ID:sayme,项目名称:skeleton,代码行数:33,代码来源:template-tags.php

示例10: hw2contracts_nua_custom_request_approval_message

function hw2contracts_nua_custom_request_approval_message($message, $username, $email)
{
    $user = get_user_by('email', $email);
    $newMessage = "Before approve letting the user to see the form maybe you want to fill Beem fields in its agreement<br>" . "Using <a href='" . bloginfo("url") . '/' . Conf::$hw2cf_page_alias . "/?user=" . $user->ID . "'>this link</a><br><br>";
    $newMessage .= $message;
    return $newMessage;
}
开发者ID:hyperweb2,项目名称:contract-form,代码行数:7,代码来源:nua.php

示例11: fun_wp_footer

function fun_wp_footer()
{
    echo '
	<script type="text/javascript" src="' . THEME_URI . '/js/jquery.min.js"></script>
	<script type="text/javascript" src="' . THEME_URI . '/js/scripts.js"></script>
	';
    if (is_home() && ot_get_option('opt_slider') == 'on') {
        ?>
		<script type="text/javascript">
		eval(function(p,a,c,k,e,d){e=function(c){return c};if(!''.replace(/^/,String)){while(c--)d[c]=k[c]||c;k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('$(4).3(2(){$(\'#1\').0()});',5,5,'nivoSlider|slider|function|load|window'.split('|'),0,{}))
		</script>
<?php 
    }
    if (ot_get_option('opt_share')) {
        ?>
		<script type="text/javascript">
		window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"1","bdSize":"24"},"share":{},"selectShare":{"bdContainerClass":null,"bdSelectMiniList":["qzone","tsina","tqq","renren","weixin","douban"]}};
		with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?cdnversion='+~(-new Date()/36e5)];
		</script>
<?php 
    }
    if (is_single()) {
        ?>
		<script type="text/javascript" src="<?php 
        bloginfo('template_directory');
        ?>
/js/comments-ajax.js"></script>
<?php 
    }
}
开发者ID:xiapistudio,项目名称:change,代码行数:30,代码来源:common-scripts.php

示例12: server

function server()
{
    global $wp_version;
    $license = trim(get_option('edd_sample_theme_license_key'));
    /*$api_params = array(
         'edd_action' => 'check_license',
         'license' => $license,
         'item_name' => urlencode( EDD_SL_THEME_NAME ) );
     $response = wp_remote_get( add_query_arg( $api_params, EDD_SL_STORE_URL ), array( 'timeout' => 5, 'sslverify' => false ) );
     if ( is_wp_error( $response ) )
      return false;*/
    $license_data = (object) array('license' => 'valid');
    //json_decode( wp_remote_retrieve_body( $response ) );
    if ($license_data->license == 'valid') {
    } else {
        ?>
  <div id="message" class="off error below-h2">
   <p><span class="dashicons dashicons-admin-generic" style="color: #F07E78;"></span> Es posible que esta secci&oacute;n no funcione correctamente, <strong><?php 
        echo THEME_NAME;
        ?>
 <?php 
        echo THEME_VERSION;
        ?>
</strong> solicita la activaci&oacute;n de su licencia, hagalo desde <a href="<?php 
        bloginfo('url');
        ?>
/wp-admin/admin.php?page=mundothemes">aqu&iacute;</a>
   </p>
  </div>
  <?php 
    }
}
开发者ID:zakaria340,项目名称:critique,代码行数:32,代码来源:generate-options.php

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

示例14: widget_sms

/**
 * widget_sms
 *
 * widget for follower registration
 *
 * @access public
 * @params array $args
 * @return none
 */
function widget_sms($args)
{
    require_once "functions.php";
    global $sms_submitted, $wpdb;
    extract($args);
    echo "\n <!--Infoblast SMS Follower Widget by Muhammad Hamizi Jaminan http://www.hamizi.net/-->\n";
    echo $before_widget;
    echo $before_title . get_option("sms_header") . $after_title;
    echo "<div id=\"sms_submitted\" style=\"text-align:center;\"></div>";
    echo "<div id=\"sms_loading\" style=\"display:none; text-align:center;\"><img src=\"" . get_bloginfo('url') . "/wp-content/plugins/infoblast-sms-follower/img/load.gif\"/></div>";
    ?>
	<form name='sms_sub_form' id='sms_sub_form' style="padding:3px;text-align:center;" method='POST'>
		<p>Phone Number<br/>
		+<label name="sms_country_code" id="sms_country_code">60</label><input type="text" name="sms_number" id="sms_number"/>
		</p>
		<input type="button" value="Follow" name="sms_follow" id="sms_follower"/> <input type="checkbox" name="sms_unfollow" id="sms_unfollow"> Unfollow
	</form>
	<input type="hidden" value="<?php 
    bloginfo('url');
    ?>
" id="sms_url"/>
<?php 
    echo "<h6><em>" . get_option("sms_footer") . "</em></h6>";
    echo $after_widget;
    echo "\n <!--End of Infoblast SMS Follower-->";
}
开发者ID:hymns,项目名称:infoblast-sms-follower,代码行数:35,代码来源:widget.php

示例15: origines_logo

/**
 * Check if a logo is defined and present it.
 */
function origines_logo()
{
    $logofile = get_option('origines_logo');
    if ($logofile == "") {
        ?>
		<a class="brand" href="<?php 
        bloginfo('url');
        ?>
" title="<?php 
        bloginfo('description');
        ?>
"><?php 
        bloginfo('name');
        ?>
</a>
	<?php 
    } else {
        ?>
		<a class="brand" style="padding: 5px 20px 5px;" href="<?php 
        bloginfo('url');
        ?>
" title="<?php 
        bloginfo('description');
        ?>
"><img src="<?php 
        echo get_option('origines_logo');
        ?>
" alt="<?php 
        bloginfo('name');
        ?>
" /></a>
	<?php 
    }
}
开发者ID:shahidbasheer,项目名称:origines,代码行数:37,代码来源:origines-functions.php


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