本文整理汇总了PHP中bloginfo_rss函数的典型用法代码示例。如果您正苦于以下问题:PHP bloginfo_rss函数的具体用法?PHP bloginfo_rss怎么用?PHP bloginfo_rss使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了bloginfo_rss函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: meta_data
function meta_data()
{
?>
<generator><?php
echo WPFront_User_Role_Editor_Export::GENERATOR;
?>
</generator>
<version><?php
echo WPFront_User_Role_Editor_Export::VERSION;
?>
</version>
<date><?php
echo date('D, d M Y H:i:s +0000');
?>
</date>
<source><?php
bloginfo_rss('name');
?>
</source>
<source_url><?php
bloginfo_rss('url');
?>
</source_url>
<user_display_name><?php
echo cdata(wp_get_current_user()->display_name);
?>
</user_display_name>
<user_id><?php
echo wp_get_current_user()->ID;
?>
</user_id>
<?php
}
示例2: wp_title_rss_filter
/**
* Fix double title in rss
*/
public function wp_title_rss_filter($title)
{
if (!tfuse_options('enable_tfuse_seo_tab', true)) {
return $title;
}
$exploded = explode($this->bloginfo_rss_name, ent2ncr($title));
if (!$exploded[0]) {
array_shift($exploded);
}
if (sizeof($exploded) > 1) {
$title = implode(bloginfo_rss('name'), $exploded);
} else {
$title = implode('', $exploded);
}
return $title;
}
示例3: widget_blix_feeds
function widget_blix_feeds()
{
?>
<h2><em><?php
_e('Feeds');
?>
</em></h2>
<ul class="feeds">
<li><a href="<?php
bloginfo_rss('rss2_url');
?>
">Entries (RSS)</a></li>
<li><a href="<?php
bloginfo_rss('comments_rss2_url');
?>
">Comments (RSS)</a></li>
</ul>
<?php
}
示例4: bloginfo_rss
</homePageLink>
<apis>
<api name="WordPress" blogID="1" preferred="true" apiLink="<?php
bloginfo_rss('wpurl');
?>
/xmlrpc.php" />
<api name="Movable Type" blogID="1" preferred="false" apiLink="<?php
bloginfo_rss('wpurl');
?>
/xmlrpc.php" />
<api name="MetaWeblog" blogID="1" preferred="false" apiLink="<?php
bloginfo_rss('wpurl');
?>
/xmlrpc.php" />
<api name="Blogger" blogID="1" preferred="false" apiLink="<?php
bloginfo_rss('wpurl');
?>
/xmlrpc.php" />
</apis>
</service>
</rsd>
<?php
exit;
}
include_once ABSPATH . 'wp-admin/includes/admin.php';
include_once ABSPATH . WPINC . '/class-IXR.php';
// Turn off all warnings and errors.
// error_reporting(0);
$post_default_title = "";
// posts submitted via the xmlrpc interface get that title
$xmlrpc_logging = 0;
示例5: output
/**
* Output the RSS feed.
*/
protected function output()
{
$this->http_headers();
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: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/"
<?php
/**
* Fires at the end of the opening RSS tag for feed output so plugins can add extra attributes.
*
* @since 1.8.0
*/
do_action('bp_activity_feed_rss_attributes');
?>
>
<channel>
<title><?php
echo $this->title;
?>
</title>
<link><?php
echo $this->link;
?>
</link>
<atom:link href="<?php
self_link();
?>
" rel="self" type="application/rss+xml" />
<description><?php
echo $this->description;
?>
</description>
<lastBuildDate><?php
echo mysql2date('D, d M Y H:i:s O', bp_activity_get_last_updated(), false);
?>
</lastBuildDate>
<generator>https://buddypress.org/?v=<?php
bp_version();
?>
</generator>
<language><?php
bloginfo_rss('language');
?>
</language>
<ttl><?php
echo $this->ttl;
?>
</ttl>
<sy:updatePeriod><?php
echo $this->update_period;
?>
</sy:updatePeriod>
<sy:updateFrequency><?php
echo $this->update_frequency;
?>
</sy:updateFrequency>
<?php
/**
* Fires at the end of channel elements list in RSS feed so plugins can add extra channel elements.
*
* @since 1.8.0
*/
do_action('bp_activity_feed_channel_elements');
?>
<?php
if (bp_has_activities($this->activity_args)) {
?>
<?php
while (bp_activities()) {
bp_the_activity();
?>
<item>
<guid isPermaLink="false"><?php
bp_activity_feed_item_guid();
?>
</guid>
<title><?php
echo stripslashes(bp_get_activity_feed_item_title());
?>
</title>
<link><?php
bp_activity_thread_permalink();
?>
</link>
<pubDate><?php
echo mysql2date('D, d M Y H:i:s O', bp_get_activity_feed_item_date(), false);
?>
</pubDate>
<?php
//.........这里部分代码省略.........
示例6: bloginfo_rss
?>
" rel="self" type="application/rss+xml" />
<link><?php
bloginfo_rss('url');
?>
</link>
<description><?php
bloginfo_rss("description");
?>
</description>
<lastBuildDate><?php
echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), false);
?>
</lastBuildDate>
<language><?php
bloginfo_rss('language');
?>
</language>
<sy:updatePeriod><?php
echo apply_filters('rss_update_period', 'hourly');
?>
</sy:updatePeriod>
<sy:updateFrequency><?php
echo apply_filters('rss_update_frequency', '1');
?>
</sy:updateFrequency>
<?php
do_action('rss2_head');
?>
<?php
示例7: feed
function feed()
{
$title = sprintf('%s log', $this->name);
header('Content-type: text/xml; charset=' . get_option('blog_charset'), true);
echo '<?xml version="1.0" encoding="' . get_option('blog_charset') . '"?' . ">\r\n";
?>
<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/">
<channel>
<title><?php
echo $title . ' - ';
bloginfo_rss('name');
?>
</title>
<link><?php
bloginfo_rss('url');
?>
</link>
<description><?php
bloginfo_rss("description");
?>
</description>
<pubDate><?php
echo htmlspecialchars(mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), false));
?>
</pubDate>
<generator><?php
echo htmlspecialchars('http://wordpress.org/?v=');
bloginfo_rss('version');
?>
</generator>
<language><?php
echo get_option('rss_language');
?>
</language>
<?php
if (count($this->items) > 0) {
foreach ($this->items as $log) {
?>
<item>
<title><![CDATA[<?php
echo $log->url;
?>
]]></title>
<link><![CDATA[<?php
bloginfo('home');
echo $log->url;
?>
]]></link>
<pubDate><?php
echo mysql2date('D, d M Y H:i:s +0000', $log->created_at, false);
?>
</pubDate>
<guid isPermaLink="false"><?php
print $log->id;
?>
</guid>
<description><![CDATA[<?php
echo $log->url;
?>
]]></description>
<content:encoded><![CDATA[<?php
if ($log->referrer) {
echo 'Referred by ' . $log->referrer;
}
?>
]]></content:encoded>
</item>
<?php
}
}
?>
</channel>
</rss>
<?php
die;
}
示例8: do_action
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
<?php do_action('rss2_ns'); do_action('rss2_comments_ns'); ?>
>
<channel>
<title><?php
if ( is_singular() )
printf(ent2ncr(__('Comments on: %s')), get_the_title_rss());
elseif ( is_search() )
printf(ent2ncr(__('Comments for %s searching on %s')), get_bloginfo_rss( 'name' ), esc_attr($wp_query->query_vars['s']));
else
printf(ent2ncr(__('Comments for %s')), get_bloginfo_rss( 'name' ) . get_wp_title_rss());
?></title>
<atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" />
<link><?php (is_single()) ? the_permalink_rss() : bloginfo_rss("url") ?></link>
<description><?php bloginfo_rss("description") ?></description>
<lastBuildDate><?php echo mysql2date('r', get_lastcommentmodified('GMT')); ?></lastBuildDate>
<sy:updatePeriod><?php echo apply_filters( 'rss_update_period', 'hourly' ); ?></sy:updatePeriod>
<sy:updateFrequency><?php echo apply_filters( 'rss_update_frequency', '1' ); ?></sy:updateFrequency>
<?php do_action('commentsrss2_head'); ?>
<?php
if ( have_comments() ) : while ( have_comments() ) : the_comment();
$comment_post = get_post($comment->comment_post_ID);
get_post_custom($comment_post->ID);
?>
<item>
<title><?php
if ( !is_singular() ) {
$title = get_the_title($comment_post->ID);
$title = apply_filters('the_title_rss', $title);
printf(ent2ncr(__('Comment on %1$s by %2$s')), $title, get_comment_author_rss());
示例9: bloginfo_rss
<channel>
<title><?php
bloginfo_rss('name');
?>
- Releases</title>
<link><?php
bloginfo_rss('url');
?>
/releases/</link>
<description>Records On Ribs Release Feed</description>
<pubDate><?php
echo mysql2date('D, d M Y H:i:s +0000', $releases[0]['release_date'], false);
?>
</pubDate>
<generator>http://wordpress.org/?v=<?php
bloginfo_rss('version');
?>
</generator>
<language><?php
echo get_option('rss_language');
?>
</language>
<?php
while (have_releases()) {
the_release();
?>
<?php
$artist = get_artist($release['release_artist']);
?>
<item>
<title><?php
示例10: bloginfo_rss
xmlns:content="http://purl.org/rss/1.0/modules/content/"
>
<channel rdf:about="<?php
bloginfo_rss("url");
?>
">
<title><?php
bloginfo_rss('name');
?>
</title>
<link><?php
bloginfo_rss('url');
?>
</link>
<description><?php
bloginfo_rss('description');
?>
</description>
<dc:language><?php
echo get_settings('rss_language') ? get_settings('rss_language') : 'en';
?>
</dc:language>
<dc:date><?php
echo gmdate('Y-m-d\\TH:i:s');
?>
</dc:date>
<dc:creator><?php
echo antispambot(get_settings('admin_email'));
?>
</dc:creator>
<admin:generatorAgent rdf:resource="http://wordpress.xwd.jp/?v=<?php
示例11: feed_template
/**
* Output for Stream Records as a feed.
*
* @return xml
*/
public static function feed_template()
{
$die_title = esc_html__('Access Denied', 'stream');
$die_message = '<h1>' . $die_title . '</h1><p>' . esc_html__('You don\'t have permission to view this feed, please contact your site Administrator.', 'stream') . '</p>';
if (!isset($_GET[self::FEED_QUERY_VAR]) || empty($_GET[self::FEED_QUERY_VAR])) {
wp_die($die_message, $die_title);
}
$args = array('meta_key' => self::USER_FEED_KEY, 'meta_value' => $_GET[self::FEED_QUERY_VAR], 'number' => 1);
$user = get_users($args);
if (!is_super_admin($user[0]->ID)) {
$roles = isset($user[0]->roles) ? (array) $user[0]->roles : array();
if (self::$is_network_feed) {
wp_die($die_message, $die_title);
}
if (!$roles || !array_intersect($roles, WP_Stream_Settings::$options['general_role_access'])) {
wp_die($die_message, $die_title);
}
}
$blog_id = self::$is_network_feed ? null : get_current_blog_id();
$args = array('blog_id' => $blog_id, 'records_per_page' => wp_stream_filter_input(INPUT_GET, 'records_per_page', FILTER_SANITIZE_NUMBER_INT, array('options' => array('default' => get_option('posts_per_rss')))), 'search' => wp_stream_filter_input(INPUT_GET, 'search'), 'object_id' => wp_stream_filter_input(INPUT_GET, 'object_id', FILTER_SANITIZE_NUMBER_INT), 'ip' => wp_stream_filter_input(INPUT_GET, 'ip', FILTER_VALIDATE_IP), 'author' => wp_stream_filter_input(INPUT_GET, 'author', FILTER_SANITIZE_NUMBER_INT), 'author_role' => wp_stream_filter_input(INPUT_GET, 'author_role'), 'date' => wp_stream_filter_input(INPUT_GET, 'date'), 'date_from' => wp_stream_filter_input(INPUT_GET, 'date_from'), 'date_to' => wp_stream_filter_input(INPUT_GET, 'date_to'), 'record__in' => wp_stream_filter_input(INPUT_GET, 'record__in', FILTER_SANITIZE_NUMBER_INT), 'record_parent' => wp_stream_filter_input(INPUT_GET, 'record_parent', FILTER_SANITIZE_NUMBER_INT), 'order' => wp_stream_filter_input(INPUT_GET, 'order', FILTER_DEFAULT, array('options' => array('default' => 'desc'))), 'orderby' => wp_stream_filter_input(INPUT_GET, 'orderby', FILTER_DEFAULT, array('options' => array('default' => 'ID'))), 'fields' => wp_stream_filter_input(INPUT_GET, 'fields', FILTER_DEFAULT, array('options' => array('default' => 'with-meta'))));
$records = wp_stream_query($args);
$latest_record = isset($records[0]->created) ? $records[0]->created : null;
$records_admin_url = add_query_arg(array('page' => WP_Stream_Admin::RECORDS_PAGE_SLUG), admin_url(WP_Stream_Admin::ADMIN_PARENT_PAGE));
if ('json' === wp_stream_filter_input(INPUT_GET, self::FEED_TYPE_QUERY_VAR)) {
if (version_compare(PHP_VERSION, '5.4', '>=')) {
echo json_encode($records, JSON_PRETTY_PRINT);
} else {
echo json_encode($records);
}
} else {
header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true);
printf('<?xml version="1.0" encoding="%s"?>', esc_attr(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/"
<?php
/**
* Action fires during RSS xmls printing
*/
?>
<?php
do_action('rss2_ns');
?>
>
<channel>
<title><?php
bloginfo_rss('name');
?>
- <?php
esc_html_e('Stream Feed', 'stream');
?>
</title>
<atom:link href="<?php
self_link();
?>
" rel="self" type="application/rss+xml" />
<link><?php
echo esc_url($records_admin_url);
?>
</link>
<description><?php
bloginfo_rss('description');
?>
</description>
<lastBuildDate><?php
echo esc_html(mysql2date('r', $latest_record, false));
?>
</lastBuildDate>
<language><?php
bloginfo_rss('language');
?>
</language>
<sy:updatePeriod><?php
echo esc_html('hourly');
?>
</sy:updatePeriod>
<sy:updateFrequency><?php
echo absint(1);
?>
</sy:updateFrequency>
<?php
/**
* Action fires during RSS head
*/
?>
<?php
do_action('rss2_head');
?>
<?php
//.........这里部分代码省略.........
示例12: bbp_display_replies_feed_rss2
/**
* Output an RSS2 feed of replies, based on the query passed.
*
* @since bbPress (r3171)
*
* @uses bbp_version()
* @uses bbp_is_single_topic()
* @uses bbp_user_can_view_forum()
* @uses bbp_get_topic_forum_id()
* @uses bbp_show_load_topic()
* @uses bbp_topic_permalink()
* @uses bbp_topic_title()
* @uses bbp_get_topic_reply_count()
* @uses bbp_topic_content()
* @uses bbp_has_replies()
* @uses bbp_replies()
* @uses bbp_the_reply()
* @uses bbp_reply_url()
* @uses bbp_reply_title()
* @uses bbp_reply_content()
* @uses get_wp_title_rss()
* @uses get_option()
* @uses bloginfo_rss
* @uses self_link()
* @uses the_author()
* @uses get_post_time()
* @uses rss_enclosure()
* @uses do_action()
* @uses apply_filters()
*
* @param array $replies_query
*/
function bbp_display_replies_feed_rss2($replies_query = array())
{
// User cannot access forum this topic is in
if (bbp_is_single_topic() && !bbp_user_can_view_forum(array('forum_id' => bbp_get_topic_forum_id()))) {
return;
}
// Adjust the title based on context
if (bbp_is_single_topic() && bbp_user_can_view_forum(array('forum_id' => bbp_get_topic_forum_id()))) {
$title = apply_filters('wp_title_rss', get_wp_title_rss(' » '));
} elseif (!bbp_show_lead_topic()) {
$title = ' » ' . __('All Posts', 'bbpress');
} else {
$title = ' » ' . __('All Replies', 'bbpress');
}
// Display the feed
header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true);
header('Status: 200 OK');
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"
<?php
do_action('bbp_feed');
?>
>
<channel>
<title><?php
bloginfo_rss('name');
echo $title;
?>
</title>
<atom:link href="<?php
self_link();
?>
" rel="self" type="application/rss+xml" />
<link><?php
self_link();
?>
</link>
<description><?php
//
?>
</description>
<pubDate><?php
echo mysql2date('D, d M Y H:i:s O', current_time('mysql'), false);
?>
</pubDate>
<generator>http://bbpress.org/?v=<?php
bbp_version();
?>
</generator>
<language><?php
bloginfo_rss('language');
?>
</language>
<?php
do_action('bbp_feed_head');
?>
<?php
if (bbp_is_single_topic()) {
//.........这里部分代码省略.........
示例13: require
$feed = 'rss';
$doing_rss = 1;
require('wp-blog-header.php');
}
header('Content-type: text/xml; charset=' . get_settings('blog_charset'), true);
$more = 1;
?>
<?php echo '<?xml version="1.0" encoding="'.get_settings('blog_charset').'"?'.'>'; ?>
<!-- generator="wordpress/<?php echo $wp_version ?>" -->
<rss version="0.92">
<channel>
<title><?php bloginfo_rss('name') ?></title>
<link><?php bloginfo_rss('url') ?></link>
<description><?php bloginfo_rss('description') ?></description>
<lastBuildDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), 0); ?></lastBuildDate>
<docs>http://backend.userland.com/rss092</docs>
<language><?php echo get_option('rss_language'); ?></language>
<?php $items_count = 0; if ($posts) { foreach ($posts as $post) { start_wp(); ?>
<item>
<title><?php the_title_rss() ?></title>
<?php if (get_settings('rss_use_excerpt')) { ?>
<description><![CDATA[<?php the_excerpt_rss() ?>]]></description>
<?php } else { // use content ?>
<description><?php the_content_rss('', 0, '', get_settings('rss_excerpt_length')) ?></description>
<?php } ?>
<link><?php permalink_single_rss() ?></link>
</item>
<?php $items_count++; if (($items_count == get_settings('posts_per_rss')) && empty($m)) { break; } } } ?>
示例14: get_option
<div class="widget connection">
<ul>
<li><a href="http://facebook.com/<?php
echo get_option('loogle_facebook');
?>
" class="facebook" title="Facebook">Facebook</a></li>
<li><a href="http://twitter.com/<?php
echo get_option('loogle_twitter');
?>
" class="twitter" title="Twitter" >Twitter</a></li>
<li><a href="http://myspace.com/<?php
echo get_option('loogle_myspace');
?>
" class="myspace"title="Myspace" >Myspace</a></li>
<li><a href="<?php
bloginfo_rss('rss2_url');
?>
" class="rss" title="Syndicate this site using RSS 2.0">RSS Subscribe</a></li>
</ul>
</div>
-->
<?php
if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('Leftbar')) {
?>
<div class="widget">
<div class="widgettitle"><?php
_e('Archives');
?>
</div>
<ul>
示例15: dsq_export_wp
function dsq_export_wp($post, $comments = null)
{
global $wpdb;
if (!$comments) {
$comments = $wpdb->get_results($wpdb->prepare("SELECT * FROM {$wpdb->comments} WHERE comment_post_ID = %d AND comment_agent NOT LIKE 'Disqus/%%'", $post->ID));
}
// start catching output
ob_start();
echo '<?xml version="1.0" encoding="' . get_bloginfo('charset') . '"?' . ">\n";
the_generator('export');
?>
<rss version="2.0"
xmlns:excerpt="http://wordpress.org/export/<?php
echo WXR_VERSION;
?>
/excerpt/"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dsq="https://disqus.com/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:wp="http://wordpress.org/export/<?php
echo WXR_VERSION;
?>
/"
>
<channel>
<title><?php
bloginfo_rss('name');
?>
</title>
<link><?php
bloginfo_rss('url');
?>
</link>
<pubDate><?php
echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), false);
?>
</pubDate>
<generator>WordPress <?php
bloginfo_rss('version');
?>
; Disqus <?php
echo DISQUS_VERSION;
?>
</generator>
<?php
global $wp_query, $post;
$wp_query->in_the_loop = true;
// Fake being in the loop.
setup_postdata($post);
?>
<item>
<title><?php
echo apply_filters('the_title_rss', $post->post_title);
?>
</title>
<link><?php
the_permalink_rss();
?>
</link>
<pubDate><?php
echo mysql2date('D, d M Y H:i:s +0000', get_post_time('Y-m-d H:i:s', true), false);
?>
</pubDate>
<dc:creator><?php
echo dsq_export_wxr_cdata(get_the_author());
?>
</dc:creator>
<guid isPermaLink="false"><?php
the_guid();
?>
</guid>
<content:encoded><?php
echo dsq_export_wxr_cdata(apply_filters('the_content_export', $post->post_content));
?>
</content:encoded>
<dsq:thread_identifier><?php
echo dsq_identifier_for_post($post);
?>
</dsq:thread_identifier>
<wp:post_id><?php
echo $post->ID;
?>
</wp:post_id>
<wp:post_date_gmt><?php
echo $post->post_date_gmt;
?>
</wp:post_date_gmt>
<wp:comment_status><?php
echo $post->comment_status;
?>
</wp:comment_status>
<?php
if ($comments) {
foreach ($comments as $c) {
?>
<wp:comment>
<wp:comment_id><?php
echo $c->comment_ID;
//.........这里部分代码省略.........