Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/20/2011 03:56:04 AM (14 years ago)
Author:
johnjamesjacoby
Message:

First pass at BP_Component class. Refactor Activity component to use BP_Component. Introduce page templates for root directories. Rename bp-activity-templatetags to bp-activity-template per WP coding standards. Split bp-activity up into smaller parts. Introduce get_slug functions for activity component. More refactoring to do on other components. This will temporarily break trunk while refactoring happens, so be sure to pin to the previous revision if needed.

File:
1 edited

Legend:

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

    r3698 r3751  
    9595add_action( 'wp_ajax_forums_filter', 'bp_dtheme_object_template_loader' );
    9696
    97 /* This function will load the activity loop template when activity is requested via AJAX */
     97// This function will load the activity loop template when activity is requested via AJAX
    9898function bp_dtheme_activity_template_loader() {
    9999    global $bp;
    100100
    101     /* We need to calculate and return the feed URL for each scope */
    102     $feed_url = site_url( BP_ACTIVITY_SLUG . '/feed/' );
     101    // We need to calculate and return the feed URL for each scope
     102    $feed_url = home_url( bp_get_activity_root_slug() . '/feed/' );
    103103
    104104    switch ( $_POST['scope'] ) {
    105105        case 'friends':
    106             $feed_url = $bp->loggedin_user->domain . BP_ACTIVITY_SLUG . '/friends/feed/';
     106            $feed_url = $bp->loggedin_user->domain . bp_get_activity_slug() . '/friends/feed/';
    107107            break;
    108108        case 'groups':
    109             $feed_url = $bp->loggedin_user->domain . BP_ACTIVITY_SLUG . '/groups/feed/';
     109            $feed_url = $bp->loggedin_user->domain . bp_get_activity_slug() . '/groups/feed/';
    110110            break;
    111111        case 'favorites':
    112             $feed_url = $bp->loggedin_user->domain . BP_ACTIVITY_SLUG . '/favorites/feed/';
     112            $feed_url = $bp->loggedin_user->domain . bp_get_activity_slug() . '/favorites/feed/';
    113113            break;
    114114        case 'mentions':
    115             $feed_url = $bp->loggedin_user->domain . BP_ACTIVITY_SLUG . '/mentions/feed/';
     115            $feed_url = $bp->loggedin_user->domain . bp_get_activity_slug() . '/mentions/feed/';
    116116            delete_user_meta( $bp->loggedin_user->id, 'bp_new_mention_count' );
    117117            break;
Note: See TracChangeset for help on using the changeset viewer.