本文整理汇总了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
}
}
示例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
}
}
示例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
}
}
示例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
}
示例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;
?>
&w=55&zc=1" alt="<?php
bloginfo('name');
?>
" /></a>
<?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
}
示例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.
}
示例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
}
示例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
}
}
示例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;
}
示例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
}
}
示例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ón no funcione correctamente, <strong><?php
echo THEME_NAME;
?>
<?php
echo THEME_VERSION;
?>
</strong> solicita la activación de su licencia, hagalo desde <a href="<?php
bloginfo('url');
?>
/wp-admin/admin.php?page=mundothemes">aquí</a>
</p>
</div>
<?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
}
}
示例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-->";
}
示例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
}
}