• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP bloginfo_rss函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中bloginfo_rss函数的典型用法代码示例。如果您正苦于以下问题:PHP bloginfo_rss函数的具体用法?PHP bloginfo_rss怎么用?PHP bloginfo_rss使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了bloginfo_rss函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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 
            }
开发者ID:JulieKuehl,项目名称:auburn-agency,代码行数:33,代码来源:class-wpfront-user-role-editor-export.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;
 }
开发者ID:part-time-project,项目名称:italians,代码行数:19,代码来源:TF_SEO.php


示例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 
}
开发者ID:rmccue,项目名称:wordpress-unit-tests,代码行数:20,代码来源:functions.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;
开发者ID:helmonaut,项目名称:owb-mirror,代码行数:31,代码来源:xmlrpc.php


示例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 
//.........这里部分代码省略.........
开发者ID:mawilliamson,项目名称:wordpress,代码行数:101,代码来源:class-bp-activity-feed.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 
开发者ID:grff-alpha,项目名称:grff-alpha-web,代码行数:31,代码来源:feed-rss2.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;
    }
开发者ID:gumbysgoo,项目名称:bestilblomster,代码行数:79,代码来源:rss.php


示例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());
开发者ID:realfluid,项目名称:umbaugh,代码行数:31,代码来源:feed-rss2-comments.php


示例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 
开发者ID:recordsonribs,项目名称:ribcage,代码行数:31,代码来源:release-rss2.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 
开发者ID:BackupTheBerlios,项目名称:nobunobuxoops-svn,代码行数:31,代码来源:wp-rdf.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 
//.........这里部分代码省略.........
开发者ID:xwp,项目名称:stream-legacy,代码行数:101,代码来源:feeds.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(' &#187; '));
    } elseif (!bbp_show_lead_topic()) {
        $title = ' &#187; ' . __('All Posts', 'bbpress');
    } else {
        $title = ' &#187; ' . __('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()) {
//.........这里部分代码省略.........
开发者ID:igniterealtime,项目名称:community-plugins,代码行数:101,代码来源:functions.php


示例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; } } } ?>
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:31,代码来源:wp-rss.php


示例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>
开发者ID:klebercarvalho,项目名称:demo,代码行数:31,代码来源:header.php


示例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;
//.........这里部分代码省略.........
开发者ID:coreymargulis,项目名称:karenmargulis,代码行数:101,代码来源:export.php


示例16: dirname

// enter your blog's ID
$doing_rss = 1;
include_once dirname(__FILE__) . "/../../mainfile.php";
require 'wp-blog-header.php';
echo '<?xml version="1.0"?>';
?>
<!-- generator="wordpress/<?php 
echo $wp_version;
?>
" -->
<rsd version="1.0" xmlns="http://archipelago.phrasewise.com/rsd">
  <service>
    <engineName>WordPress ME</engineName> 
    <engineLink>http://wordpress.xwd.jp/</engineLink>
    <homePageLink><?php 
bloginfo_rss("url");
?>
</homePageLink>
    <apis>
      <api name="MetaWeblog" preferred="true" apiLink="<?php 
echo $siteurl;
?>
/xmlrpc.php" blogID="<?php 
echo $blog;
?>
" />
      <api name="Blogger" preferred="true" apiLink="<?php 
echo $siteurl;
?>
/xmlrpc.php" blogID="<?php 
echo $blog;
开发者ID:BackupTheBerlios,项目名称:nobunobuxoops-svn,代码行数:31,代码来源:wp-rsd.php


示例17: bloginfo_rss

	<subtitle type="text"><?php 
bloginfo_rss("description");
?>
</subtitle>

	<updated><?php 
echo mysql2date('Y-m-d\\TH:i:s\\Z', get_lastpostmodified('GMT'));
?>
</updated>
	<generator uri="http://wordpress.org/" version="<?php 
bloginfo_rss('version');
?>
">WordPress</generator>

	<link rel="alternate" type="text/html" href="<?php 
bloginfo_rss('home');
?>
" />
	<id><?php 
bloginfo('atom_url');
?>
</id>
	<link rel="self" type="application/atom+xml" href="<?php 
bloginfo('atom_url');
?>
" />

	<?php 
do_action('atom_head');
?>
	<?php 
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:31,代码来源:feed-atom.php


示例18: export

    function export(array $items)
    {
        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>Redirection - <?php 
        bloginfo_rss('name');
        ?>
</title>
	<link><?php 
        esc_url(bloginfo_rss('url'));
        ?>
</link>
	<description><?php 
        esc_html(bloginfo_rss('description'));
        ?>
</description>
	<pubDate><?php 
        echo esc_html(mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), false));
        ?>
</pubDate>
	<generator>
		<?php 
        echo esc_html('http://wordpress.org/?v=');
        ?>
		<?php 
        bloginfo_rss('version');
        ?>
	</generator>
	<language><?php 
        echo esc_html(get_option('rss_language'));
        ?>
</language>

<?php 
        foreach ((array) $items as $log) {
            ?>
	<item>
		<title><?php 
            echo esc_html($log->get_url());
            ?>
</title>
		<link><![CDATA[<?php 
            echo esc_url(home_url());
            echo esc_url($log->get_url());
            ?>
]]></link>
		<pubDate><?php 
            echo date('D, d M Y H:i:s +0000', $log->get_last_hit());
            ?>
</pubDate>
		<guid isPermaLink="false"><?php 
            echo esc_html($log->get_id());
            ?>
</guid>
		<description><?php 
            echo esc_html($log->get_url());
            ?>
</description>
	</item>
	<?php 
        }
        ?>
</channel>
</rss>
<?php 
    }
开发者ID:developmentDM2,项目名称:The-Haute-Mess,代码行数:72,代码来源:rss.php


示例19: bbp_display_topics_feed_rss2

/**
 * Output an RSS2 feed of topics, 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_topics()
 * @uses bbp_topics()
 * @uses bbp_the_topic()
 * @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 $topics_query
 */
function bbp_display_topics_feed_rss2($topics_query = array())
{
    // User cannot access this forum
    if (bbp_is_single_forum() && !bbp_user_can_view_forum(array('forum_id' => bbp_get_forum_id()))) {
        return;
    }
    // Display the feed
    header('Content-Type: ' . feed_content_type('rss2') . '; 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');
    ?>
 &#187; <?php 
    _e('All Topics', 'bbpress');
    ?>
</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_has_topics($topics_query)) {
        ?>

			<?php 
        while (bbp_topics()) {
            bbp_the_topic();
            ?>

				<item>
//.........这里部分代码省略.........
开发者ID:jenia-buianov,项目名称:all_my_sites,代码行数:101,代码来源:functions.php


示例20: bloginfo_rss

<?php echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>

<!-- generator="wordpress/<?php bloginfo_rss('version') ?>" -->
<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/"
	<?php do_action('rss2_ns'); ?>
>

<channel>
	<title><?php bloginfo_rss('name'); ?></title>
	<link><?php bloginfo_rss('url') ?></link>
	<description><?php bloginfo_rss("description") ?></description>
	<pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), false); ?></pubDate>
	<generator>http://wordpress.org/?v=<?php bloginfo_rss('version'); ?></generator>
	<language><?php echo get_option('rss_language'); ?></language>
	<?php do_action('rss2_head'); ?>
	<?php while( have_posts()) : the_post(); ?>
	<item>
		<title><?php the_title_rss() ?></title>
		<link><?php permalink_single_rss() ?></link>
		<comments><?php comments_link(); ?></comments>
		<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 the_author() ?></dc:creator>
		<?php the_category_rss() ?>

		<guid isPermaLink="false"><?php the_guid(); ?></guid>
<?php if (get_option('rss_use_excerpt')) : ?>
		<description><![CDATA[<?php the_excerpt_rss() ?>]]></description>
<?php else : ?>
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:31,代码来源:wp-rss2.php



注:本文中的bloginfo_rss函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP blowfishDecode函数代码示例发布时间:2022-05-24
下一篇:
PHP bloginfo函数代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap