Skip to:
Content

BuddyPress.org

Changeset 2573


Ignore:
Timestamp:
02/03/2010 07:53:15 PM (14 years ago)
Author:
johnjamesjacoby
Message:

Replace hard coded paths with component constant slugs

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity.php

    r2547 r2573  
    113113    /* Add the subnav items to the activity nav item if we are using a theme that supports this */
    114114    bp_core_new_subnav_item( array( 'name' => __( 'Personal', 'buddypress' ), 'slug' => 'just-me', 'parent_url' => $activity_link, 'parent_slug' => $bp->activity->slug, 'screen_function' => 'bp_activity_screen_my_activity', 'position' => 10 ) );
    115     bp_core_new_subnav_item( array( 'name' => __( 'Friends', 'buddypress' ), 'slug' => 'friends', 'parent_url' => $activity_link, 'parent_slug' => $bp->activity->slug, 'screen_function' => 'bp_activity_screen_friends', 'position' => 20, 'item_css_id' => 'activity-friends' ) );
    116     bp_core_new_subnav_item( array( 'name' => __( 'Groups', 'buddypress' ), 'slug' => 'groups', 'parent_url' => $activity_link, 'parent_slug' => $bp->activity->slug, 'screen_function' => 'bp_activity_screen_groups', 'position' => 30, 'item_css_id' => 'activity-groups' ) );
     115    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' ) );
     116    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' ) );
    117117    bp_core_new_subnav_item( array( 'name' => __( 'Favorites', 'buddypress' ), 'slug' => 'favorites', 'parent_url' => $activity_link, 'parent_slug' => $bp->activity->slug, 'screen_function' => 'bp_activity_screen_favorites', 'position' => 40, 'item_css_id' => 'activity-favs' ) );
    118118    bp_core_new_subnav_item( array( 'name' => sprintf( __( '@%s Mentions', 'buddypress' ), $user_login ), 'slug' => 'mentions', 'parent_url' => $activity_link, 'parent_slug' => $bp->activity->slug, 'screen_function' => 'bp_activity_screen_mentions', 'position' => 50, 'item_css_id' => 'activity-mentions' ) );
  • trunk/bp-themes/bp-default/_inc/ajax.php

    r2559 r2573  
    191191
    192192        switch ( $scope ) {
    193             case 'friends':
     193            case BP_FRIENDS_SLUG:
    194194                $friend_ids = implode( ',', friends_get_friend_user_ids( $bp->loggedin_user->id ) );
    195195                $query_string = 'user_id=' . $friend_ids;
    196                 $feed_url = $bp->loggedin_user->domain . BP_ACTIVITY_SLUG . '/friends/feed/';
     196                $feed_url = $bp->loggedin_user->domain . BP_ACTIVITY_SLUG . '/' . BP_FRIENDS_SLUG . '/feed/';
    197197                break;
    198             case 'groups':
     198            case BP_GROUPS_SLUG:
    199199                $groups = groups_get_user_groups( $bp->loggedin_user->id );
    200200                $group_ids = implode( ',', $groups['groups'] );
    201201                $query_string = 'object=groups&primary_id=' . $group_ids . '&show_hidden=1';
    202                 $feed_url = $bp->loggedin_user->domain . BP_ACTIVITY_SLUG . '/groups/feed/';
     202                $feed_url = $bp->loggedin_user->domain . BP_ACTIVITY_SLUG . '/' . BP_GROUPS_SLUG . '/feed/';
    203203                break;
    204204            case 'favorites':
  • trunk/bp-themes/bp-default/activity/index.php

    r2539 r2573  
    2424                        <?php if ( function_exists( 'bp_get_total_friend_count' ) ) : ?>
    2525                            <?php if ( bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?>
    26                                 <li id="activity-friends"><a href="<?php echo bp_loggedin_user_domain() . BP_ACTIVITY_SLUG . '/friends/' ?>" title="<?php _e( 'The activity of my friends only.', 'buddypress' ) ?>"><?php printf( __( 'My Friends (%s)', 'buddypress' ), bp_get_total_friend_count( bp_loggedin_user_id() ) ) ?></a></li>
     26                                <li id="activity-friends"><a href="<?php echo bp_loggedin_user_domain() . BP_ACTIVITY_SLUG . '/' . BP_FRIENDS_SLUG . '/' ?>" title="<?php _e( 'The activity of my friends only.', 'buddypress' ) ?>"><?php printf( __( 'My Friends (%s)', 'buddypress' ), bp_get_total_friend_count( bp_loggedin_user_id() ) ) ?></a></li>
    2727                            <?php endif; ?>
    2828                        <?php endif; ?>
     
    3030                        <?php if ( function_exists( 'bp_get_total_group_count_for_user' ) ) : ?>
    3131                            <?php if ( bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) : ?>
    32                                 <li id="activity-groups"><a href="<?php echo bp_loggedin_user_domain() . BP_ACTIVITY_SLUG . '/groups/' ?>" title="<?php _e( 'The activity of groups I am a member of.', 'buddypress' ) ?>"><?php printf( __( 'My Groups (%s)', 'buddypress' ), bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) ?></a></li>
     32                                <li id="activity-groups"><a href="<?php echo bp_loggedin_user_domain() . BP_ACTIVITY_SLUG . '/' . BP_GROUPS_SLUG . '/' ?>" title="<?php _e( 'The activity of groups I am a member of.', 'buddypress' ) ?>"><?php printf( __( 'My Groups (%s)', 'buddypress' ), bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) ?></a></li>
    3333                            <?php endif; ?>
    3434                        <?php endif; ?>
Note: See TracChangeset for help on using the changeset viewer.