/**
     * 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 
                if (bp_get_activity_feed_item_description()) {
                    ?>
					<content:encoded><![CDATA[<?php 
                    $this->feed_content();
                    ?>
]]></content:encoded>
				<?php 
                }
                ?>

				<?php 
                if (bp_activity_can_comment()) {
                    ?>
					<slash:comments><?php 
                    bp_activity_comment_count();
                    ?>
</slash:comments>
				<?php 
                }
                ?>

				<?php 
                /**
                 * Fires at the end of the individual RSS Item list in RSS feed so plugins can add extra item elements.
                 *
                 * @since 1.8.0
                 */
                do_action('bp_activity_feed_item_elements');
                ?>
			</item>
		<?php 
            }
            ?>

	<?php 
        }
        ?>
</channel>
</rss><?php 
    }
    /**
     * Output the RSS feed.
     */
    protected function output()
    {
        // set up some additional headers if not on a directory page
        // this is done b/c BP uses pseudo-pages
        if (!bp_is_directory()) {
            global $wp_query;
            $wp_query->is_404 = false;
            status_header(200);
        }
        header('Content-Type: text/xml; charset=' . get_option('blog_charset'), true);
        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 
        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>http://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 
        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 
                if (bp_get_activity_feed_item_description()) {
                    ?>
					<content:encoded><![CDATA[<?php 
                    $this->feed_content();
                    ?>
]]></content:encoded>
				<?php 
                }
                ?>

				<?php 
                if (bp_activity_can_comment()) {
                    ?>
					<slash:comments><?php 
                    bp_activity_comment_count();
                    ?>
</slash:comments>
				<?php 
                }
                ?>

				<?php 
                do_action('bp_activity_feed_item_elements');
                ?>
			</item>
		<?php 
            }
            ?>

	<?php 
        }
        ?>
</channel>
</rss><?php 
    }
示例#3
0
 function handle_buddypress_activity_integration()
 {
     if ($this->check_applicability_module('buddypress')) {
         $activity_type = bp_get_activity_type();
         $activity_link = bp_get_activity_thread_permalink();
         $activity_title = bp_get_activity_feed_item_title();
         printf('%1$s<div style="clear: both;"></div>', $this->generate_share_buttons('buddypress', 'share', array('only_share' => false, 'post_type' => 'buddypress', 'url' => $activity_link, 'title' => $activity_title)));
     }
 }
/**
 * Outputs the activity feed item title
 *
 * @since 1.0.0
 *
 * @uses bp_get_activity_feed_item_title()
 */
function bp_activity_feed_item_title()
{
    echo bp_get_activity_feed_item_title();
}
示例#5
0
文件: essb.php 项目: ajay786singh/emc
 function buddy_social_button_activity_filter()
 {
     // buddypress activity
     $activity_type = bp_get_activity_type();
     $activity_link = bp_get_activity_thread_permalink();
     $activity_title = bp_get_activity_feed_item_title();
     echo '<div style="clear: both;\\"></div>';
     $options = $this->options;
     $essb_networks = $options['networks'];
     $buttons = "";
     foreach ($essb_networks as $k => $v) {
         if ($v[0] == 1) {
             if ($buttons != '') {
                 $buttons .= ",";
             }
             $buttons .= $k;
         }
     }
     $activity_title = str_replace('[&#8230;]', '', $activity_title);
     $need_counters = $options['show_counter'] ? 1 : 0;
     $links = do_shortcode('[easy-share buttons="' . $buttons . '" counters=0 native="no" url="' . urlencode($activity_link) . '" text="' . htmlspecialchars($activity_title) . '" nostats="yes" hide_names="yes"]');
     echo $links . '<div style="clear: both;\\"></div>';
 }