Changeset 4647
- Timestamp:
- 07/12/2011 02:11:01 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-actions.php
r4646 r4647 268 268 global $bp, $wp_query; 269 269 270 if ( !bp_is_active( 'friends' ) || !bp_is_current_component( 'activity' ) || !bp_is_user() || !bp_is_current_action( $bp->friends->slug) || !isset( $bp->action_variables[0] ) || $bp->action_variables[0] != 'feed' )270 if ( !bp_is_active( 'friends' ) || !bp_is_current_component( 'activity' ) || !bp_is_user() || !bp_is_current_action( bp_get_friends_slug() ) || !isset( $bp->action_variables[0] ) || $bp->action_variables[0] != 'feed' ) 271 271 return false; 272 272 -
trunk/bp-activity/bp-activity-loader.php
r4621 r4647 152 152 $sub_nav[] = array( 153 153 'name' => __( 'Friends', 'buddypress' ), 154 'slug' => $bp->friends->slug,154 'slug' => bp_get_friends_slug(), 155 155 'parent_url' => $activity_link, 156 156 'parent_slug' => $this->slug, -
trunk/bp-friends/bp-friends-actions.php
r3917 r4647 10 10 global $bp; 11 11 12 if ( $bp->current_component != $bp->friends->slug || $bp->current_action != 'add-friend')12 if ( !bp_is_friends_component() || !bp_is_current_action( 'add-friend' ) ) 13 13 return false; 14 14 … … 49 49 global $bp; 50 50 51 if ( $bp->current_component != $bp->friends->slug || $bp->current_action != 'remove-friend')51 if ( !bp_is_friends_component() || !bp_is_current_action( 'remove-friend' ) ) 52 52 return false; 53 53 -
trunk/bp-friends/bp-friends-activity.php
r4639 r4647 82 82 83 83 case 'friendship_request': 84 $link = bp_loggedin_user_domain() . $bp->friends->slug. '/requests?new';84 $link = bp_loggedin_user_domain() . bp_get_friends_slug() . '/requests?new'; 85 85 86 86 // Set up the string and the filter -
trunk/bp-friends/bp-friends-loader.php
r4586 r4647 103 103 ); 104 104 105 $friends_link = trailingslashit( $bp->loggedin_user->domain . $bp->friends->slug);105 $friends_link = trailingslashit( $bp->loggedin_user->domain . bp_get_friends_slug() ); 106 106 107 107 // Add the subnav items to the friends nav item 108 108 $sub_nav[] = array( 109 'name' => __( 'Friendships', 'buddypress' ),110 'slug' => 'my-friends',111 'parent_url' => $friends_link,112 'parent_slug' => $bp->friends->slug,109 'name' => __( 'Friendships', 'buddypress' ), 110 'slug' => 'my-friends', 111 'parent_url' => $friends_link, 112 'parent_slug' => bp_get_friends_slug(), 113 113 'screen_function' => 'friends_screen_my_friends', 114 'position' => 10,114 'position' => 10, 115 115 'item_css_id' => 'friends-my-friends' 116 116 ); … … 120 120 'slug' => 'requests', 121 121 'parent_url' => $friends_link, 122 'parent_slug' => $bp->friends->slug,122 'parent_slug' => bp_get_friends_slug(), 123 123 'screen_function' => 'friends_screen_requests', 124 124 'position' => 20, -
trunk/bp-friends/bp-friends-template.php
r4612 r4647 52 52 global $bp; ?> 53 53 54 <li<?php if ( !isset($bp->action_variables[0]) || 'recently-active' == $bp->action_variables[0] ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . $bp->friends->slug?>/my-friends/recently-active"><?php _e( 'Recently Active', 'buddypress' ) ?></a></li>55 <li<?php if ( 'newest' == $bp->action_variables[0] ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . $bp->friends->slug?>/my-friends/newest"><?php _e( 'Newest', 'buddypress' ) ?></a></li>56 <li<?php if ( 'alphabetically' == $bp->action_variables[0] ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . $bp->friends->slug?>/my-friends/alphabetically"><?php _e( 'Alphabetically', 'buddypress' ) ?></a></li>54 <li<?php if ( !isset($bp->action_variables[0]) || 'recently-active' == $bp->action_variables[0] ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . bp_get_friends_slug() ?>/my-friends/recently-active"><?php _e( 'Recently Active', 'buddypress' ) ?></a></li> 55 <li<?php if ( 'newest' == $bp->action_variables[0] ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . bp_get_friends_slug() ?>/my-friends/newest"><?php _e( 'Newest', 'buddypress' ) ?></a></li> 56 <li<?php if ( 'alphabetically' == $bp->action_variables[0] ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . bp_get_friends_slug() ?>/my-friends/alphabetically"><?php _e( 'Alphabetically', 'buddypress' ) ?></a></li> 57 57 58 58 <?php … … 87 87 88 88 <div class="info-group"> 89 <h4><?php bp_word_or_name( __( "My Friends", 'buddypress' ), __( "%s's Friends", 'buddypress' ) ) ?> (<?php echo BP_Friends_Friendship::total_friend_count( $bp->displayed_user->id ) ?>) <span><a href="<?php echo $bp->displayed_user->domain . $bp->friends->slug?>"><?php _e('See All', 'buddypress') ?> →</a></span></h4>89 <h4><?php bp_word_or_name( __( "My Friends", 'buddypress' ), __( "%s's Friends", 'buddypress' ) ) ?> (<?php echo BP_Friends_Friendship::total_friend_count( $bp->displayed_user->id ) ?>) <span><a href="<?php echo $bp->displayed_user->domain . bp_get_friends_slug() ?>"><?php _e('See All', 'buddypress') ?> →</a></span></h4> 90 90 91 91 <?php if ( $friend_ids ) { ?> … … 186 186 global $friends_template, $bp; 187 187 188 $action = $bp->displayed_user->domain . $bp->friends->slug. '/my-friends/search/';188 $action = $bp->displayed_user->domain . bp_get_friends_slug() . '/my-friends/search/'; 189 189 $label = __( 'Filter Friends', 'buddypress' ); ?> 190 190 … … 308 308 'wrapper_class' => 'friendship-button pending', 309 309 'wrapper_id' => 'friendship-button-' . $potential_friend_id, 310 'link_href' => trailingslashit( $bp->loggedin_user->domain . $bp->friends->slug. '/requests' ),310 'link_href' => trailingslashit( $bp->loggedin_user->domain . bp_get_friends_slug() . '/requests' ), 311 311 'link_text' => __( 'Friendship Requested', 'buddypress' ), 312 312 'link_title' => __( 'Friendship Requested', 'buddypress' ), … … 323 323 'wrapper_class' => 'friendship-button is_friend', 324 324 'wrapper_id' => 'friendship-button-' . $potential_friend_id, 325 'link_href' => wp_nonce_url( $bp->loggedin_user->domain . $bp->friends->slug. '/remove-friend/' . $potential_friend_id . '/', 'friends_remove_friend' ),325 'link_href' => wp_nonce_url( $bp->loggedin_user->domain . bp_get_friends_slug() . '/remove-friend/' . $potential_friend_id . '/', 'friends_remove_friend' ), 326 326 'link_text' => __( 'Cancel Friendship', 'buddypress' ), 327 327 'link_title' => __( 'Cancel Friendship', 'buddypress' ), … … 340 340 'wrapper_class' => 'friendship-button not_friends', 341 341 'wrapper_id' => 'friendship-button-' . $potential_friend_id, 342 'link_href' => wp_nonce_url( $bp->loggedin_user->domain . $bp->friends->slug. '/add-friend/' . $potential_friend_id . '/', 'friends_add_friend' ),342 'link_href' => wp_nonce_url( $bp->loggedin_user->domain . bp_get_friends_slug() . '/add-friend/' . $potential_friend_id . '/', 'friends_add_friend' ), 343 343 'link_text' => __( 'Add Friend', 'buddypress' ), 344 344 'link_title' => __( 'Add Friend', 'buddypress' ), … … 398 398 } 399 399 400 return apply_filters( 'bp_get_friend_accept_request_link', wp_nonce_url( $bp->loggedin_user->domain . $bp->friends->slug. '/requests/accept/' . $friendship_id, 'friends_accept_friendship' ) );400 return apply_filters( 'bp_get_friend_accept_request_link', wp_nonce_url( $bp->loggedin_user->domain . bp_get_friends_slug() . '/requests/accept/' . $friendship_id, 'friends_accept_friendship' ) ); 401 401 } 402 402 … … 412 412 } 413 413 414 return apply_filters( 'bp_get_friend_reject_request_link', wp_nonce_url( $bp->loggedin_user->domain . $bp->friends->slug. '/requests/reject/' . $friendship_id, 'friends_reject_friendship' ) );414 return apply_filters( 'bp_get_friend_reject_request_link', wp_nonce_url( $bp->loggedin_user->domain . bp_get_friends_slug() . '/requests/reject/' . $friendship_id, 'friends_reject_friendship' ) ); 415 415 } 416 416 -
trunk/bp-members/bp-members-buddybar.php
r4605 r4647 181 181 182 182 <li> 183 <a href="<?php echo trailingslashit( $bp->displayed_user->domain . $bp->friends->slug); ?>"><?php _e( 'Friends', 'buddypress' ); ?></a>183 <a href="<?php echo trailingslashit( $bp->displayed_user->domain . bp_get_friends_slug() ); ?>"><?php _e( 'Friends', 'buddypress' ); ?></a> 184 184 <ul> 185 185 <li><a href="<?php bp_members_component_link( 'friends', 'admin', array( 'clear' => 'friendships' ), true ); ?>" class="confirm"><?php printf( __( "Remove %s's Friendships", 'buddypress' ), esc_attr( $bp->displayed_user->fullname ) ) ?></a></li> -
trunk/bp-themes/bp-default/_inc/ajax.php
r4646 r4647 413 413 echo __("Friendship could not be canceled.", 'buddypress'); 414 414 } else { 415 echo '<a id="friend-' . $_POST['fid'] . '" class="add" rel="add" title="' . __( 'Add Friend', 'buddypress' ) . '" href="' . wp_nonce_url( $bp->loggedin_user->domain . $bp->friends->slug. '/add-friend/' . $_POST['fid'], 'friends_add_friend' ) . '">' . __( 'Add Friend', 'buddypress' ) . '</a>';415 echo '<a id="friend-' . $_POST['fid'] . '" class="add" rel="add" title="' . __( 'Add Friend', 'buddypress' ) . '" href="' . wp_nonce_url( $bp->loggedin_user->domain . bp_get_friends_slug() . '/add-friend/' . $_POST['fid'], 'friends_add_friend' ) . '">' . __( 'Add Friend', 'buddypress' ) . '</a>'; 416 416 } 417 417 … … 423 423 echo __("Friendship could not be requested.", 'buddypress'); 424 424 } else { 425 echo '<a href="' . $bp->loggedin_user->domain . $bp->friends->slug. '/requests" class="requested">' . __( 'Friendship Requested', 'buddypress' ) . '</a>';425 echo '<a href="' . $bp->loggedin_user->domain . bp_get_friends_slug() . '/requests" class="requested">' . __( 'Friendship Requested', 'buddypress' ) . '</a>'; 426 426 } 427 427 } else {
Note: See TracChangeset
for help on using the changeset viewer.