bloginfo_rss()
Displays "cleaned" information about the blog (needed for RSS).
This function is identical to get_bloginfo(), the difference is that it cleans the received information from HTML tags, converts various special characters into HTML entities, etc.
Hooks from the function
Returns
null.
Usage
<?php bloginfo_rss( $show ) ?>
- $show(string)
The name of the parameter to retrieve. It can be:
-
name- the name of the blog; -
description- a short description of the site set in the settings; -
template_url- the URL of the current theme's directory; -
rss2_url- the URL of the RSS 2.0 feed (/feed); -
comments_rss2_url- the URL of the RSS 2.0 comments feed (/comments/feed); -
pingback_url- the URL for notifications to the XML-RPC file (xmlrpc.php); -
stylesheet_url- the URL to the CSS stylesheet file (usually style.css) of the current theme; -
charset- the site's character encoding; -
version- the version of WordPress being used; html_type- Content-Type of the HTML page (usually text/html).
Default: 'name'
-
Examples
#1 Display a description of the site:
<?php bloginfo_rss( 'description' ) ?>
Notes
- See: get_bloginfo() For the list of possible values to display.
Changelog
| Since 0.71 | Introduced. |
bloginfo_rss() bloginfo rss code WP 7.0
function bloginfo_rss( $show = '' ) {
/**
* Filters the bloginfo for display in RSS feeds.
*
* @since 2.1.0
*
* @see get_bloginfo()
*
* @param string $rss_container RSS container for the blog information.
* @param string $show The type of blog information to retrieve.
*/
echo apply_filters( 'bloginfo_rss', get_bloginfo_rss( $show ), $show );
}