Skip to:
Content

BuddyPress.org

Changeset 9457


Ignore:
Timestamp:
02/09/2015 08:20:22 PM (5 years ago)
Author:
johnjamesjacoby
Message:

Clean up the feed section of bp-groups-template.php.

  • Brackets
  • PHPDoc blocks
  • Add section separator
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-groups/bp-groups-template.php

    r9416 r9457  
    46274627    }
    46284628
    4629 /***
    4630  * Groups RSS Feed Template Tags
    4631  */
     4629/** Group RSS *****************************************************************/
    46324630
    46334631/**
     
    46374635 */
    46384636function bp_groups_activity_feed() {
    4639     if ( !bp_is_active( 'groups' ) || !bp_is_active( 'activity' ) || !bp_is_group() )
    4640         return; ?>
     4637
     4638    // Bail if not viewing a single group or activity is not active
     4639    if ( ! bp_is_active( 'groups' ) || ! bp_is_active( 'activity' ) || ! bp_is_group() ) {
     4640        return;
     4641    } ?>
    46414642
    46424643    <link rel="alternate" type="application/rss+xml" title="<?php bloginfo( 'name' ) ?> | <?php bp_current_group_name() ?> | <?php _e( 'Group Activity RSS Feed', 'buddypress' ) ?>" href="<?php bp_group_activity_feed_link() ?>" />
     
    46464647add_action( 'bp_head', 'bp_groups_activity_feed' );
    46474648
     4649/**
     4650 * Output the current group activity-stream RSS url
     4651 *
     4652 * @since BuddyPress (1.5.0)
     4653 */
    46484654function bp_group_activity_feed_link() {
    46494655    echo bp_get_group_activity_feed_link();
    46504656}
     4657    /**
     4658     * Return the current group activity-stream RSS url
     4659     *
     4660     * @since BuddyPress (1.5.0)
     4661     * @return string
     4662     */
    46514663    function bp_get_group_activity_feed_link() {
    4652         return apply_filters( 'bp_get_group_activity_feed_link', bp_get_group_permalink( groups_get_current_group() ) . 'feed/' );
    4653     }
     4664        $current_group = groups_get_current_group();
     4665        $group_link    = bp_get_group_permalink( $current_group ) . 'feed';
     4666        $feed_link     = trailingslashit( $group_link );
     4667
     4668        return apply_filters( 'bp_get_group_activity_feed_link', $feed_link );
     4669    }
     4670
     4671/** Current Group *************************************************************/
    46544672
    46554673/**
     
    47024720 * Echoes the output of bp_get_current_group_name()
    47034721 *
     4722 * @since BuddyPress (1.5.0)
    47044723 */
    47054724function bp_current_group_name() {
Note: See TracChangeset for help on using the changeset viewer.