Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/21/2011 12:03:25 AM (15 years ago)
Author:
johnjamesjacoby
Message:

Move more user functions out of core component and into user component. Fixes to loaders. More code clean-up.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity/bp-activity-loader.php

    r3764 r3778  
    4444        $this->table_name      = $bp->table_prefix . 'bp_activity';
    4545        $this->table_name_meta = $bp->table_prefix . 'bp_activity_meta';
     46       
     47        // Register this in the active components array
     48        $bp->active_components[$this->id] = $this->id;
     49
     50        // The default text for the blogs directory search box
     51        $bp->default_search_strings[$this->id] = __( 'Search Activity...', 'buddypress' );     
    4652    }
    4753
     
    6975        bp_core_new_nav_item( array(
    7076            'name'                => __( 'Activity', 'buddypress' ),
    71             'slug'                => $bp->activity->slug,
     77            'slug'                => $this->slug,
    7278            'position'            => 10,
    7379            'screen_function'     => 'bp_activity_screen_my_activity',
    7480            'default_subnav_slug' => 'just-me',
    75             'item_css_id'         => $bp->activity->id )
     81            'item_css_id'         => $this->id )
    7682        );
    7783
     
    8389        $user_domain   = ( isset( $bp->displayed_user->domain ) )               ? $bp->displayed_user->domain               : $bp->loggedin_user->domain;
    8490        $user_login    = ( isset( $bp->displayed_user->userdata->user_login ) ) ? $bp->displayed_user->userdata->user_login : $bp->loggedin_user->userdata->user_login;
    85         $activity_link = $user_domain . $bp->activity->slug . '/';
     91        $activity_link = $user_domain . $this->slug . '/';
    8692
    8793        // Add the subnav items to the activity nav item if we are using a theme that supports this
     
    9096            'slug'            => 'just-me',
    9197            'parent_url'      => $activity_link,
    92             'parent_slug'     => $bp->activity->slug,
     98            'parent_slug'     => $this->slug,
    9399            'screen_function' => 'bp_activity_screen_my_activity',
    94100            'position'        => 10
     
    101107                'slug'            => BP_FRIENDS_SLUG,
    102108                'parent_url'      => $activity_link,
    103                 'parent_slug'     => $bp->activity->slug,
     109                'parent_slug'     => $this->slug,
    104110                'screen_function' => 'bp_activity_screen_friends',
    105111                'position'        => 20,
     
    114120                'slug'            => BP_GROUPS_SLUG,
    115121                'parent_url'      => $activity_link,
    116                 'parent_slug'     => $bp->activity->slug,
     122                'parent_slug'     => $this->slug,
    117123                'screen_function' => 'bp_activity_screen_groups',
    118124                'position'        => 30,
     
    126132            'slug'            => 'favorites',
    127133            'parent_url'      => $activity_link,
    128             'parent_slug'     => $bp->activity->slug,
     134            'parent_slug'     => $this->slug,
    129135            'screen_function' => 'bp_activity_screen_favorites',
    130136            'position'        => 40,
     
    137143            'slug'            => 'mentions',
    138144            'parent_url'      => $activity_link,
    139             'parent_slug'     => $bp->activity->slug,
     145            'parent_slug'     => $this->slug,
    140146            'screen_function' => 'bp_activity_screen_mentions',
    141147            'position'        => 50,
Note: See TracChangeset for help on using the changeset viewer.