' . $show . '
',
'bloginfo()
',
'url
'
) );
case 'url' :
$output = home_url();
break;
case 'wpurl' :
$output = site_url();
break;
case 'description':
$output = get_option('blogdescription');
break;
case 'rdf_url':
$output = get_feed_link('rdf');
break;
case 'rss_url':
$output = get_feed_link('rss');
break;
case 'rss2_url':
$output = get_feed_link('rss2');
break;
case 'atom_url':
$output = get_feed_link('atom');
break;
case 'comments_atom_url':
$output = get_feed_link('comments_atom');
break;
case 'comments_rss2_url':
$output = get_feed_link('comments_rss2');
break;
case 'pingback_url':
$output = site_url( 'xmlrpc.php' );
break;
case 'stylesheet_url':
$output = get_stylesheet_uri();
break;
case 'stylesheet_directory':
$output = get_stylesheet_directory_uri();
break;
case 'template_directory':
case 'template_url':
$output = get_template_directory_uri();
break;
case 'admin_email':
$output = get_option('admin_email');
break;
case 'charset':
$output = get_option('blog_charset');
if ('' == $output) $output = 'UTF-8';
break;
case 'html_type' :
$output = get_option('html_type');
break;
case 'version':
global $wp_version;
$output = $wp_version;
break;
case 'language':
$output = get_locale();
$output = str_replace('_', '-', $output);
break;
case 'text_direction':
_deprecated_argument( __FUNCTION__, '2.2', sprintf(
/* translators: 1: 'text_direction' argument, 2: bloginfo() function name, 3: is_rtl() function name */
__( 'The %1$s option is deprecated for the family of %2$s functions. Use the %3$s function instead.' ),
'' . $show . '
',
'bloginfo()
',
'is_rtl()
'
) );
if ( function_exists( 'is_rtl' ) ) {
$output = is_rtl() ? 'rtl' : 'ltr';
} else {
$output = 'ltr';
}
break;
case 'name':
default:
$output = get_option('blogname');
break;
}
$url = true;
if (strpos($show, 'url') === false &&
strpos($show, 'directory') === false &&
strpos($show, 'home') === false)
$url = false;
if ( 'display' == $filter ) {
if ( $url ) {
/**
* Filter the URL returned by get_bloginfo().
*
* @since 2.0.5
*
* @param mixed $output The URL returned by bloginfo().
* @param mixed $show Type of information requested.
*/
$output = apply_filters( 'bloginfo_url', $output, $show );
} else {
/**
* Filter the site information returned by get_bloginfo().
*
* @since 0.71
*
* @param mixed $output The requested non-URL site information.
* @param mixed $show Type of information requested.
*/
$output = apply_filters( 'bloginfo', $output, $show );
}
}
return $output;
}
/**
* Returns the Site Icon URL.
*
* @param int $size Size of the site icon.
* @param string $url Fallback url if no site icon is found.
* @param int $blog_id Id of the blog to get the site icon for.
* @return string Site Icon URL.
*/
function get_site_icon_url( $size = 512, $url = '', $blog_id = 0 ) {
if ( $blog_id && is_multisite() ) {
$site_icon_id = get_blog_option( $blog_id, 'site_icon' );
} else {
$site_icon_id = get_option( 'site_icon' );
}
if ( $site_icon_id ) {
if ( $size >= 512 ) {
$size_data = 'full';
} else {
$size_data = array( $size, $size );
}
$url_data = wp_get_attachment_image_src( $site_icon_id, $size_data );
if ( $url_data ) {
$url = $url_data[0];
}
}
return $url;
}
/**
* Displays the Site Icon URL.
*
* @param int $size Size of the site icon.
* @param string $url Fallback url if no site icon is found.
* @param int $blog_id Id of the blog to get the site icon for.
*/
function site_icon_url( $size = 512, $url = '', $blog_id = 0 ) {
echo esc_url( get_site_icon_url( $size, $url, $blog_id ) );
}
/**
* Whether the site has a Site Icon.
*
* @param int $blog_id Optional. Blog ID. Default: Current blog.
* @return bool
*/
function has_site_icon( $blog_id = 0 ) {
return (bool) get_site_icon_url( 512, '', $blog_id );
}
/**
* Display title tag with contents.
*
* @ignore
* @since 4.1.0
* @access private
*
* @see wp_title()
*/
function _wp_render_title_tag() {
if ( ! current_theme_supports( 'title-tag' ) ) {
return;
}
// This can only work internally on wp_head.
if ( ! did_action( 'wp_head' ) && ! doing_action( 'wp_head' ) ) {
return;
}
echo '