Changeset 4646
- Timestamp:
- 07/12/2011 01:52:18 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-actions.php
r4548 r4646 17 17 18 18 // Not viewing activity 19 if ( ( $bp->activity->slug != bp_current_component() ) || !bp_is_current_action( 'p' ) )19 if ( ( bp_is_activity_component() ) || !bp_is_current_action( 'p' ) ) 20 20 return false; 21 21 … … 44 44 // Activity is a user update 45 45 if ( !empty( $activity->user_id ) ) { 46 $redirect = bp_core_get_user_domain( $activity->user_id, $activity->user_nicename, $activity->user_login ) . $bp->activity->slug. '/' . $activity->id . '/';46 $redirect = bp_core_get_user_domain( $activity->user_id, $activity->user_nicename, $activity->user_login ) . bp_get_activity_slug() . '/' . $activity->id . '/'; 47 47 48 48 // Activity is something else … … 51 51 // Set redirect to group activity stream 52 52 if ( $group = groups_get_group( array( 'group_id' => $activity->item_id ) ) ) { 53 $redirect = bp_get_group_permalink( $group ) . $bp->activity->slug. '/' . $activity->id . '/';53 $redirect = bp_get_group_permalink( $group ) . bp_get_activity_slug() . '/' . $activity->id . '/'; 54 54 } 55 55 } … … 57 57 // Set redirect to users' activity stream 58 58 } else { 59 $redirect = bp_core_get_user_domain( $activity->user_id, $activity->user_nicename, $activity->user_login ) . $bp->activity->slug. '/' . $activity->id;59 $redirect = bp_core_get_user_domain( $activity->user_id, $activity->user_nicename, $activity->user_login ) . bp_get_activity_slug() . '/' . $activity->id; 60 60 } 61 61 … … 126 126 127 127 // Do not proceed if user is not logged in, not viewing activity, or not posting 128 if ( !is_user_logged_in() || ( $bp->activity->slug != bp_current_component()) || !bp_is_current_action( 'post' ) )128 if ( !is_user_logged_in() || bp_is_activity_component() || !bp_is_current_action( 'post' ) ) 129 129 return false; 130 130 … … 172 172 global $bp; 173 173 174 if ( !is_user_logged_in() || ( $bp->activity->slug != bp_current_component() ) || !bp_is_current_action( 'reply' ) )174 if ( !is_user_logged_in() || ( bp_is_activity_component() ) || !bp_is_current_action( 'reply' ) ) 175 175 return false; 176 176 … … 204 204 global $bp; 205 205 206 if ( !is_user_logged_in() || ( $bp->activity->slug != bp_current_component() ) || !bp_is_current_action( 'favorite' ) )206 if ( !is_user_logged_in() || ( bp_is_activity_component() ) || !bp_is_current_action( 'favorite' ) ) 207 207 return false; 208 208 … … 222 222 global $bp; 223 223 224 if ( !is_user_logged_in() || ( $bp->activity->slug != bp_current_component() ) || !bp_is_current_action( 'unfavorite' ) )224 if ( !is_user_logged_in() || ( bp_is_activity_component() ) || !bp_is_current_action( 'unfavorite' ) ) 225 225 return false; 226 226 -
trunk/bp-activity/bp-activity-functions.php
r4628 r4646 126 126 $activity_id = $item_id; 127 127 $poster_user_id = $secondary_item_id; 128 $at_mention_link = $bp->loggedin_user->domain . $bp->activity->slug. '/mentions/';128 $at_mention_link = bp_displayed_user_domain() . bp_get_activity_slug() . '/mentions/'; 129 129 $at_mention_title = sprintf( __( '@%s Mentions', 'buddypress' ), $bp->loggedin_user->userdata->user_nicename ); 130 130 -
trunk/bp-activity/bp-activity-screens.php
r4605 r4646 147 147 is_user_logged_in() ? 148 148 bp_core_redirect( $bp->loggedin_user->domain ) : 149 bp_core_redirect( site_url( 'wp-login.php?redirect_to=' . esc_url( bp_get_root_domain() . '/' . $bp->activity->slug. '/p/' . $bp->current_action ) ) );149 bp_core_redirect( site_url( 'wp-login.php?redirect_to=' . esc_url( bp_get_root_domain() . '/' . bp_get_activity_root_slug() . '/p/' . $bp->current_action ) ) ); 150 150 } 151 151 -
trunk/bp-activity/bp-activity-template.php
r4611 r4646 249 249 250 250 // Support for permalinks on single item pages: /groups/my-group/activity/124/ 251 if ( $bp->current_action == $bp->activity->slug)251 if ( bp_is_current_action( bp_get_activity_slug() ) ) 252 252 $include = $bp->action_variables[0]; 253 253 … … 1032 1032 global $bp; 1033 1033 1034 $link = wp_nonce_url( bp_get_root_domain() . '/' . $bp->activity->slug. '/delete/?cid=' . bp_get_activity_comment_id(), 'bp_activity_delete_link' );1034 $link = wp_nonce_url( bp_get_root_domain() . '/' . bp_get_activity_slug() . '/delete/?cid=' . bp_get_activity_comment_id(), 'bp_activity_delete_link' ); 1035 1035 1036 1036 return apply_filters( 'bp_activity_comment_delete_link', $link ); … … 1364 1364 return false; 1365 1365 1366 return apply_filters( 'bp_get_send_public_message_link', wp_nonce_url( $bp->loggedin_user->domain . $bp->activity->slug. '/?r=' . bp_core_get_username( $bp->displayed_user->id, $bp->displayed_user->userdata->user_nicename, $bp->displayed_user->userdata->user_login ) ) );1366 return apply_filters( 'bp_get_send_public_message_link', wp_nonce_url( bp_loggedin_user_domain() . bp_get_activity_slug() . '/?r=' . bp_core_get_username( $bp->displayed_user->id, $bp->displayed_user->userdata->user_nicename, $bp->displayed_user->userdata->user_login ) ) ); 1367 1367 } 1368 1368 … … 1440 1440 global $bp; 1441 1441 1442 if ( $bp->current_component == $bp->profile->slug || 'just-me' == $bp->current_action)1443 $link = $bp->displayed_user->domain . $bp->activity->slug. '/feed/';1444 elseif ( bp_is_active( 'friends' ) && $bp->friends->slug == $bp->current_action)1445 $link = $bp->displayed_user->domain . $bp->activity->slug . '/' . $bp->friends->slug. '/feed/';1446 elseif ( bp_is_active( 'groups' ) && $bp->groups->slug == $bp->current_action)1447 $link = $bp->displayed_user->domain . $bp->activity->slug . '/' . $bp->groups->slug. '/feed/';1442 if ( bp_is_profile_component() || bp_is_current_action( 'just-me' ) ) 1443 $link = bp_displayed_user_domain() . bp_get_activity_slug() . '/feed/'; 1444 elseif ( bp_is_active( 'friends' ) && bp_is_current_action( bp_get_friends_slug() ) ) 1445 $link = bp_displayed_user_domain() . bp_get_activity_slug() . '/' . bp_get_friends_slug() . '/feed/'; 1446 elseif ( bp_is_active( 'groups' ) && bp_is_current_action( bp_get_groups_slug() ) ) 1447 $link = bp_displayed_user_domain() . bp_get_activity_slug() . '/' . bp_get_groups_slug() . '/feed/'; 1448 1448 elseif ( 'favorites' == $bp->current_action ) 1449 $link = $bp->displayed_user->domain . $bp->activity->slug. '/favorites/feed/';1449 $link = bp_displayed_user_domain() . bp_get_activity_slug() . '/favorites/feed/'; 1450 1450 elseif ( 'mentions' == $bp->current_action ) 1451 $link = $bp->displayed_user->domain . $bp->activity->slug. '/mentions/feed/';1451 $link = bp_displayed_user_domain() . bp_get_activity_slug() . '/mentions/feed/'; 1452 1452 else 1453 1453 $link = ''; -
trunk/bp-activity/feeds/bp-activity-friends-feed.php
r4373 r4646 21 21 <title><?php bp_site_name() ?> | <?php echo $bp->displayed_user->fullname; ?> | <?php _e( 'Friends Activity', 'buddypress' ) ?></title> 22 22 <atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" /> 23 <link><?php echo $bp->displayed_user->domain . $bp->activity->slug. '/my-friends/feed' ?></link>23 <link><?php echo bp_displayed_user_domain() . bp_get_activity_slug() . '/my-friends/feed' ?></link> 24 24 <description><?php printf( __( '%s - Friends Activity Feed', 'buddypress' ), $bp->displayed_user->fullname ) ?></description> 25 25 <pubDate><?php echo mysql2date('D, d M Y H:i:s O', bp_activity_get_last_updated(), false); ?></pubDate> -
trunk/bp-activity/feeds/bp-activity-group-feed.php
r4373 r4646 21 21 <title><?php bp_site_name() ?> | <?php echo $bp->groups->current_group->name ?> | <?php _e( 'Group Activity', 'buddypress' ) ?></title> 22 22 <atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" /> 23 <link><?php echo bp_get_group_permalink( $bp->groups->current_group ) . $bp->activity->slug. '/feed' ?></link>23 <link><?php echo bp_get_group_permalink( $bp->groups->current_group ) . bp_get_activity_slug() . '/feed' ?></link> 24 24 <description><?php printf( __( '%s - Group Activity Feed', 'buddypress' ), $bp->groups->current_group->name ) ?></description> 25 25 <pubDate><?php echo mysql2date('D, d M Y H:i:s O', bp_activity_get_last_updated(), false); ?></pubDate> -
trunk/bp-activity/feeds/bp-activity-personal-feed.php
r4373 r4646 21 21 <title><?php bp_site_name() ?> | <?php echo $bp->displayed_user->fullname; ?> | <?php _e( 'Activity', 'buddypress' ) ?></title> 22 22 <atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" /> 23 <link><?php echo $bp->displayed_user->domain . $bp->activity->slug. '/feed' ?></link>23 <link><?php echo bp_displayed_user_domain() . bp_get_activity_slug() . '/feed' ?></link> 24 24 <description><?php printf( __( '%s - Activity Feed', 'buddypress' ), $bp->displayed_user->fullname ) ?></description> 25 25 <pubDate><?php echo mysql2date('D, d M Y H:i:s O', bp_activity_get_last_updated(), false); ?></pubDate> -
trunk/bp-activity/feeds/bp-activity-sitewide-feed.php
r4373 r4646 22 22 <title><?php bp_site_name() ?> | <?php _e( 'Site Wide Activity', 'buddypress' ) ?></title> 23 23 <atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" /> 24 <link><?php echo site_url() . '/' . $bp->activity->slug. '/feed' ?></link>24 <link><?php echo bp_get_root_domain() . '/' . bp_get_activity_root_slug() . '/feed' ?></link> 25 25 <description><?php _e( 'Site Wide Activity Feed', 'buddypress' ) ?></description> 26 26 <pubDate><?php echo mysql2date('D, d M Y H:i:s O', bp_activity_get_last_updated(), false); ?></pubDate> -
trunk/bp-groups/bp-groups-screens.php
r4638 r4646 442 442 global $bp; 443 443 444 if ( !bp_is_groups_component() || !bp_is_active( 'activity' ) || ( bp_is_active( 'activity' ) && !bp_is_current_action( $bp->activity->slug) ) || empty( $bp->action_variables[0] ) )444 if ( !bp_is_groups_component() || !bp_is_active( 'activity' ) || ( bp_is_active( 'activity' ) && !bp_is_current_action( bp_get_activity_slug() ) ) || empty( $bp->action_variables[0] ) ) 445 445 return false; 446 446 -
trunk/bp-groups/bp-groups-template.php
r4638 r4646 678 678 679 679 function bp_group_is_activity_permalink() { 680 global $bp; 681 682 if ( !bp_is_single_item() || !bp_is_current_component( 'groups' ) || !bp_is_current_action( $bp->activity->slug ) ) 680 681 if ( !bp_is_single_item() || !bp_is_current_component( 'groups' ) || !bp_is_current_action( bp_get_activity_slug() ) ) 683 682 return false; 684 683 … … 715 714 } 716 715 717 function bp_group_total_members( ) {718 echo bp_get_group_total_members( );716 function bp_group_total_members( $group = false ) { 717 echo bp_get_group_total_members( $group ); 719 718 } 720 719 function bp_get_group_total_members( $group = false ) { -
trunk/bp-themes/bp-default/_inc/ajax.php
r4628 r4646 224 224 <?php if ( bp_activity_user_can_delete() ) : ?> 225 225 <div class="acomment-options"> 226 <a href="<?php echo wp_nonce_url( bp_get_root_domain() . '/' . $bp->activity->slug. '/delete/' . bp_get_activity_id() . '?cid=' . $comment_id, 'bp_activity_delete_link' ) ?>" class="delete acomment-delete confirm bp-secondary-action" rel="nofollow"><?php _e( 'Delete', 'buddypress' ); ?></a>226 <a href="<?php echo wp_nonce_url( bp_get_root_domain() . '/' . bp_get_activity_root_slug() . '/delete/' . bp_get_activity_id() . '?cid=' . $comment_id, 'bp_activity_delete_link' ) ?>" class="delete acomment-delete confirm bp-secondary-action" rel="nofollow"><?php _e( 'Delete', 'buddypress' ); ?></a> 227 227 </div> 228 228 <?php endif; ?>
Note: See TracChangeset
for help on using the changeset viewer.