Changeset 3728 for trunk/bp-activity.php
- Timestamp:
- 01/18/2011 12:53:31 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity.php
r3666 r3728 1 1 <?php 2 3 // Required Files 2 4 require ( BP_PLUGIN_DIR . '/bp-activity/bp-activity-classes.php' ); 3 5 require ( BP_PLUGIN_DIR . '/bp-activity/bp-activity-templatetags.php' ); … … 7 9 global $bp, $current_blog; 8 10 11 // Define a slug, if necessary 9 12 if ( !defined( 'BP_ACTIVITY_SLUG' ) ) 10 define ( 'BP_ACTIVITY_SLUG', $bp->pages->activity->slug );13 define( 'BP_ACTIVITY_SLUG', bp_core_component_slug_from_root_slug( $bp->pages->activity->slug ) ); 11 14 12 15 // For internal identification 13 $bp->activity->id = 'activity';16 $bp->activity->id = 'activity'; 14 17 $bp->activity->name = $bp->pages->activity->name; 15 $bp->activity->slug = BP_ACTIVITY_SLUG; 16 18 19 // Slugs 20 $bp->activity->slug = BP_ACTIVITY_SLUG; 21 $bp->activity->root_slug = $bp->pages->activity->slug; 22 23 // Tables 17 24 $bp->activity->table_name = $bp->table_prefix . 'bp_activity'; 18 25 $bp->activity->table_name_meta = $bp->table_prefix . 'bp_activity_meta'; 19 26 27 // Notifications 20 28 $bp->activity->format_notification_function = 'bp_activity_format_notifications'; 21 29 … … 38 46 $user_domain = ( isset( $bp->displayed_user->domain ) ) ? $bp->displayed_user->domain : $bp->loggedin_user->domain; 39 47 $user_login = ( isset( $bp->displayed_user->userdata->user_login ) ) ? $bp->displayed_user->userdata->user_login : $bp->loggedin_user->userdata->user_login; 40 $activity_link = $user_domain . $bp->activity-> name. '/';48 $activity_link = $user_domain . $bp->activity->slug . '/'; 41 49 42 50 /* Add the subnav items to the activity nav item if we are using a theme that supports this */ … … 44 52 45 53 if ( bp_is_active( 'friends' ) ) 46 bp_core_new_subnav_item( array( 'name' => __( 'Friends', 'buddypress' ), 'slug' => BP_FRIENDS_SLUG, 'parent_url' => $activity_link, 'parent_slug' => $bp->activity-> name, 'screen_function' => 'bp_activity_screen_friends', 'position' => 20, 'item_css_id' => 'activity-friends' ) );54 bp_core_new_subnav_item( array( 'name' => __( 'Friends', 'buddypress' ), 'slug' => BP_FRIENDS_SLUG, 'parent_url' => $activity_link, 'parent_slug' => $bp->activity->slug, 'screen_function' => 'bp_activity_screen_friends', 'position' => 20, 'item_css_id' => 'activity-friends' ) ); 47 55 48 56 if ( bp_is_active( 'groups' ) ) 49 bp_core_new_subnav_item( array( 'name' => __( 'Groups', 'buddypress' ), 'slug' => BP_GROUPS_SLUG, 'parent_url' => $activity_link, 'parent_slug' => $bp->activity-> name, 'screen_function' => 'bp_activity_screen_groups', 'position' => 30, 'item_css_id' => 'activity-groups' ) );57 bp_core_new_subnav_item( array( 'name' => __( 'Groups', 'buddypress' ), 'slug' => BP_GROUPS_SLUG, 'parent_url' => $activity_link, 'parent_slug' => $bp->activity->slug, 'screen_function' => 'bp_activity_screen_groups', 'position' => 30, 'item_css_id' => 'activity-groups' ) ); 50 58 51 59 bp_core_new_subnav_item( array( 'name' => __( 'Favorites', 'buddypress' ), 'slug' => 'favorites', 'parent_url' => $activity_link, 'parent_slug' => $bp->activity->name, 'screen_function' => 'bp_activity_screen_favorites', 'position' => 40, 'item_css_id' => 'activity-favs' ) ); … … 60 68 } 61 69 } 62 70 63 71 do_action( 'bp_activity_setup_nav' ); 64 72 }
Note: See TracChangeset
for help on using the changeset viewer.