Skip to:
Content

BuddyPress.org

Changeset 2590


Ignore:
Timestamp:
02/04/2010 02:16:58 PM (17 years ago)
Author:
apeatling
Message:

Fixing missing feed_url handling.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-themes/bp-default/_inc/ajax.php

    r2586 r2590  
    7171        global $bp;
    7272
     73        /* We need to calculate and return the feed URL for each scope */
     74        $feed_url = site_url( BP_ACTIVITY_SLUG . '/feed/' );
     75
     76        switch ( $_POST['scope'] ) {
     77                case 'friends':
     78                        $feed_url = $bp->loggedin_user->domain . BP_ACTIVITY_SLUG . '/friends/feed/';
     79                        break;
     80                case 'groups':
     81                        $feed_url = $bp->loggedin_user->domain . BP_ACTIVITY_SLUG . '/groups/feed/';
     82                        break;
     83                case 'favorites':
     84                        $feed_url = $bp->loggedin_user->domain . BP_ACTIVITY_SLUG . '/favorites/feed/';
     85                        break;
     86                case 'mentions':
     87                        $feed_url = $bp->loggedin_user->domain . BP_ACTIVITY_SLUG . '/mentions/feed/';
     88                        delete_usermeta( $bp->loggedin_user->id, 'bp_new_mention_count' );
     89                        break;
     90        }
     91
    7392        /* Buffer the loop in the template to a var for JS to spit out. */
    7493        ob_start();
    7594        locate_template( array( 'activity/activity-loop.php' ), true );
    7695        $result['contents'] = ob_get_contents();
     96        $result['feed_url'] = apply_filters( 'bp_dtheme_activity_feed_url', $feed_url, $_POST['scope'] );
    7797        ob_end_clean();
    7898
Note: See TracChangeset for help on using the changeset viewer.