本文整理汇总了PHP中get_bloginfo_rss函数的典型用法代码示例。如果您正苦于以下问题:PHP get_bloginfo_rss函数的具体用法?PHP get_bloginfo_rss怎么用?PHP get_bloginfo_rss使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_bloginfo_rss函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_the_series_rss
function get_the_series_rss($type = 'rss')
{
$series = get_the_series();
$home = get_bloginfo_rss('home');
$the_list = '';
$series_names = array();
$filter = 'rss';
if ('atom' == $type) {
$filter = 'raw';
}
if (!empty($series)) {
foreach ((array) $series as $serial) {
$series_names[] = sanitize_term_field('name', $serial->name, $serial->term_id, 'series', $filter);
}
}
$series_names = array_unique($series_names);
foreach ($series_names as $series_name) {
if ('rdf' == $type) {
$the_list .= "\n\t\t<series:name><![CDATA[{$series_name}]]></series:name>\n";
} elseif ('atom' == $type) {
$the_list .= sprintf('<series:name scheme="%1$s" term="%2$s" />', esc_attr(apply_filters('get_bloginfo_rss', get_bloginfo('url'))), esc_attr($series_name));
} else {
$the_list .= "\n\t\t<series:name><![CDATA[{$series_name}]]></series:name>\n";
}
}
return apply_filters('the_series_rss', $the_list, $type);
}
示例2: get_feed_description
/**
* Return feed description.
*
* @return string
*/
function get_feed_description()
{
$info = strip_tags(Settings\get_site_option('description'));
$description = apply_filters('get_bloginfo_rss', convert_chars($info));
if (!$description) {
$description = get_bloginfo_rss('description');
}
return apply_filters('inpsmf_feed_description', $description);
}
示例3: wcli_wxr_site_url
/**
* Return the URL of the site
*
* @since 2.5.0
*
* @return string Site URL.
*/
function wcli_wxr_site_url()
{
// ms: the base url
if (is_multisite()) {
return network_home_url();
} else {
return get_bloginfo_rss('url');
}
}
示例4: wxr_site_url
/**
* Return the URL of the site
*
* @since 2.5.0
*
* @return string Site URL.
*/
function wxr_site_url()
{
// Multisite: the base URL.
if (is_multisite()) {
return network_home_url();
} else {
return get_bloginfo_rss('url');
}
}
示例5: wxr_site_url
function wxr_site_url()
{
global $current_site;
// mu: the base url
if (isset($current_site->domain)) {
return 'http://' . $current_site->domain . $current_site->path;
} else {
return get_bloginfo_rss('url');
}
}
示例6: mdr_postrss
/**
* Filter to added content to the bottom of rss feeds
*
* @param string $content The content of the page/post in the rrs feed.
*
* @author Matt Rude <matt@mattrude.com>
* @package Gus Theme
* @subpackage Feed Footer
* @since 0.2
*/
function mdr_postrss($content)
{
if (is_feed()) {
$site_name = get_bloginfo_rss('name');
$post_title = get_the_title_rss();
$home_url = home_url('/');
$post_url = post_permalink();
$content = $content . '<a href="' . $post_url . '">' . $post_title . '</a> is a post from; <a href="' . $home_url . '">' . $site_name . '</a> which is not allowed to be copied on other sites.';
}
return $content;
}
示例7: bloginfo_rss
/**
* Display RSS container for the bloginfo function.
*
* You can retrieve anything that you can using the get_bloginfo() function.
* Everything will be stripped of tags and characters converted, when the values
* are retrieved for use in the feeds.
*
* @since 0.71
* @see get_bloginfo() For the list of possible values to display.
*
* @param string $show See get_bloginfo() for possible values.
*/
function bloginfo_rss($show = '')
{
/**
* Filter 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);
}
示例8: tfuse_newsletter
/**
* Newsletter
*
* To override this shortcode in a child theme, copy this file to your child theme's
* theme_config/extensions/shortcodes/shortcodes/ folder.
*
* Optional arguments:
* title: e.g. Newsletter signup
* text: e.g. Thank you for your subscribtion.
* action: URL where to send the form data.
* rss_feed:
*/
function tfuse_newsletter($atts, $content = null)
{
extract(shortcode_atts(array('title' => '', 'text' => '', 'rss_feed' => ''), $atts));
if (empty($title)) {
$title = __('Newsletter', 'tfuse');
}
if (empty($text)) {
$text = __('', 'tfuse');
}
$out = '
<div class="widget widget_newsletter newsletter_subscription_box">
<h1 class="widget-title">' . $title . '</h1>
<div class="newsletter_subscription_messages before-text">
<div class="newsletter_subscription_message_initial">
' . __('', 'tfuse') . '
</div>
<div class="newsletter_subscription_message_success">
' . __('Thank you for your subscription.', 'tfuse') . '
</div>
<div class="newsletter_subscription_message_wrong_email">
' . __('Your email format is wrong!', 'tfuse') . '
</div>
<div class="newsletter_subscription_message_failed">
' . __('Sad, but we couldn\'t add you to our mailing list ATM.', 'tfuse') . '
</div>
</div>
<form action="#" method="post" class="newsletter_subscription_form">
<div class="newsletter_text">' . $text . '</div>
<input type="text" value="" name="newsletter" id="newsletter" class="newsletter_subscription_email inputtext" placeholder="' . __('Your email adress here...', 'tfuse') . '"/>
<button type="submit" class="btn btn-newsletter newsletter_subscription_submit"><span>' . __('Subscribe', 'tfuse') . '</span></button>
<div class="newsletter_subscription_ajax">' . __('Loading...', 'tfuse') . '</div>
<div class="newsletter_text">';
if ($rss_feed != 'false') {
$out .= '<a class="newssetter_subscribe" href="' . tfuse_options('feedburner_url', get_bloginfo_rss('rss2_url')) . '">' . __('I also want to subscribe to the RSS Feed', 'tfuse') . '</a>';
}
$out .= '
</div>
</form>
</div>';
return $out;
}
示例9: print_eventlist_feed
public function print_eventlist_feed()
{
header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true);
$events = $this->db->get_events($this->options->get('el_feed_upcoming_only') ? 'upcoming' : null);
// Print feeds
echo '<?xml version="1.0" encoding="' . get_option('blog_charset') . '"?>
<rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
>
<channel>
<title>' . get_bloginfo_rss('name') . '</title>
<atom:link href="' . apply_filters('self_link', get_bloginfo()) . '" rel="self" type="application/rss+xml" />
<link>' . get_bloginfo_rss('url') . '</link>
<description>' . __('Eventlist') . '</description>
<lastBuildDate>' . mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), false) . '</lastBuildDate>
<language>' . get_option('rss_language') . '</language>
<sy:updatePeriod>' . apply_filters('rss_update_period', 'hourly') . '</sy:updatePeriod>
<sy:updateFrequency>' . apply_filters('rss_update_frequency', '1') . '</sy:updateFrequency>
';
do_action('rss2_head');
if (!empty($events)) {
foreach ($events as $event) {
echo '
<item>
<title>' . esc_attr($this->format_date($event->start_date, $event->end_date) . ' - ' . $event->title) . '</title>
<pubDate>' . mysql2date('D, d M Y H:i:s +0000', $event->start_date, false) . '</pubDate>
<description>' . esc_attr($this->format_date($event->start_date, $event->end_date) . ' ' . ('' != $event->time ? $event->time : '') . ('' != $event->location ? ' - ' . $event->location : '')) . '</description>
' . ('' != $event->details ? '<content:encoded><![CDATA[' . esc_attr($this->format_date($event->start_date, $event->end_date) . ' ' . ('' != $event->time ? $event->time : '') . ('' != $event->location ? ' - ' . $event->location : '')) . $event->details . ']]></content:encoded>' : '') . '
</item>';
}
}
echo '
</channel>
</rss>';
}
示例10: wp_json_check_url
function wp_json_check_url()
{
if (preg_match('/\\/feed\\/json\\//', $_SERVER['REQUEST_URI']) || $_REQUEST['feed'] == 'json') {
header('Content-Type: application/json; charset=' . get_option('blog_charset'), true);
$items = array();
query_posts("");
while (have_posts()) {
the_post();
$item = array("title" => get_the_title_rss(), "link" => apply_filters('the_permalink_rss', get_permalink()), "description" => apply_filters('the_excerpt_rss', get_the_excerpt()));
$items[] = $item;
}
$arr = array('title' => get_bloginfo_rss('name'), 'link' => get_bloginfo_rss('url'), 'description' => get_bloginfo_rss('description'), 'language' => get_option('rss_language'), 'items' => $items);
if (function_exists('json_encode')) {
die("" . $_REQUEST["callback"] . "(" . json_encode($arr) . ");");
} else {
//TODO: Add backwards compatibility to before PHP 5.2
require_once "json.php";
$json = new Services_JSON();
die("" . $_REQUEST["callback"] . "(" . $json->encode($arr) . ");");
}
}
}
示例11: site_generator_replacement_content
function site_generator_replacement_content($gen, $type)
{
$global_site_generator = ub_get_option("site_generator_replacement");
$global_site_link = ub_get_option("site_generator_replacement_link");
if (empty($global_site_generator)) {
global $current_site;
$global_site_generator = $current_site->site_name;
}
if (empty($global_site_link)) {
global $current_site;
$global_site_link = "http://" . $current_site->domain . $current_site->path;
}
switch ($type) {
case 'html':
$gen = '<meta name="generator" content="' . $global_site_generator . '">' . "\n";
break;
case 'xhtml':
$gen = '<meta name="generator" content="' . $global_site_generator . '" />' . "\n";
break;
case 'atom':
$gen = '<generator uri="' . $global_site_link . '" version="' . get_bloginfo_rss('version') . '">' . $global_site_generator . '</generator>';
break;
case 'rss2':
$gen = '<generator>' . $global_site_link . '?v=' . get_bloginfo_rss('version') . '</generator>';
break;
case 'rdf':
$gen = '<admin:generatorAgent rdf:resource="' . $global_site_link . '?v=' . get_bloginfo_rss('version') . '" />';
break;
case 'comment':
$gen = '<!-- generator="' . $global_site_generator . '/' . get_bloginfo('version') . '" -->';
break;
case 'export':
$gen = '<!-- generator="' . $global_site_generator . '/' . get_bloginfo_rss('version') . '" created="' . date('Y-m-d H:i') . '"-->';
break;
}
return $gen;
}
示例12: tfuse_newsletter
/**
* Newsletter
*
* To override this shortcode in a child theme, copy this file to your child theme's
* theme_config/extensions/shortcodes/shortcodes/ folder.
*
* Optional arguments:
* title: e.g. Newsletter signup
* text: e.g. Thank you for your subscription.
* action: URL where to send the form data.
* rss_feed:
*/
function tfuse_newsletter($atts, $content = null)
{
extract(shortcode_atts(array('title' => '', 'text' => '', 'rss_feed' => ''), $atts));
if (empty($title)) {
$title = __('Newsletter', 'tfuse');
}
if (empty($text)) {
$text = __('Sign up for our weekly newsletter to receive updates, news, and promos:', 'tfuse');
}
$out = '
<div class="newsletter_subscription_box newsletterBox">
<div class="inner">
<div class="ribbon"></div>
<h2>' . $title . '</h2>
<div class="newsletter_subscription_messages before-text">
<div class="newsletter_subscription_message_initial">' . $text . '</div>
<div class="newsletter_subscription_message_success">' . __('Thank you for your subscription.', 'tfuse') . '</div>
<div class="newsletter_subscription_message_wrong_email">' . __('Your email format is wrong!', 'tfuse') . '</div>
<div class="newsletter_subscription_message_failed">' . __('Sad, but we couldn\'t add you to our mailing list ATM.', 'tfuse') . '</div>
</div>
<form action="#" method="post" class="newsletter_subscription_form">
<input type="text" value="" name="newsletter" class="newsletter_subscription_email inputField" />
<input type="submit" value="" class="btn-submit newsletter_subscription_submit" />
<div class="clear"></div>
</form>
<div class="newsletter_subscription_ajax">' . __('Loading', 'tfuse') . '...</div>';
if ($rss_feed == 'true') {
$out .= '<div class="newsletter_text"><a href="' . tfuse_options('feedburner_url', get_bloginfo_rss('rss2_url')) . '" class="link-news-rss">' . __('You can also', 'tfuse') . ' <span>' . __('Subscribe to our RSS', 'tfuse') . '</span> ' . __('feed', 'tfuse') . '</a></div>';
}
$out .= '</div>
</div>';
return $out;
}
示例13: get_option
xml:lang="<?php
echo get_option('rss_language');
?>
"
xmlns:thr="http://purl.org/syndication/thread/1.0"
<?php
do_action('atom_ns');
?>
>
<title type="text"><?php
if (is_singular()) {
printf(ent2ncr(__('Comments on: %s')), get_the_title_rss());
} elseif (is_search()) {
printf(ent2ncr(__('Comments for %1$s searching on %2$s')), get_bloginfo_rss('name'), attribute_escape(get_search_query()));
} else {
printf(ent2ncr(__('Comments for %s')), get_bloginfo_rss('name') . get_wp_title_rss());
}
?>
</title>
<subtitle type="text"><?php
bloginfo_rss('description');
?>
</subtitle>
<updated><?php
echo mysql2date('Y-m-d\\TH:i:s\\Z', get_lastcommentmodified('GMT'));
?>
</updated>
<?php
the_generator('atom');
?>
示例14: get_categories_xml
/**
* Retrieve categories list in XML format.
*
* @since 2.2.0
*/
function get_categories_xml()
{
log_app('function', 'get_categories_xml()');
if (!current_user_can('edit_posts')) {
$this->auth_required(__('Sorry, you do not have the right to access this site.'));
}
$home = esc_attr(get_bloginfo_rss('url'));
$categories = "";
$cats = get_categories(array('hierarchical' => 0, 'hide_empty' => 0));
foreach ((array) $cats as $cat) {
$categories .= " <category term=\"" . esc_attr($cat->name) . "\" />\n";
}
$output = <<<EOD
<app:categories xmlns:app="{$this->ATOMPUB_NS}"
\txmlns="{$this->ATOM_NS}"
\tfixed="yes" scheme="{$home}">
\t{$categories}
</app:categories>
EOD;
$this->output($output, $this->CATEGORIES_CONTENT_TYPE);
}
示例15: bloginfo
?>
/css/reset.css" type="text/css" />
<link rel="stylesheet" href="<?php
bloginfo('template_directory');
?>
/css/960.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="<?php
bloginfo('stylesheet_url');
?>
" media="screen" />
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php
if (get_option('woo_feedburner_url') != "") {
echo get_option('woo_feedburner_url');
} else {
echo get_bloginfo_rss('rss2_url');
}
?>
" />
<link rel="pingback" href="<?php
bloginfo('pingback_url');
?>
" />
<!--[if lt IE 7]>
<script src="<?php
bloginfo('template_directory');
?>
/includes/js/pngfix.js" type="text/javascript"></script>
<link rel="stylesheet" href="<?php
bloginfo('template_directory');