Changeset 4648
- Timestamp:
- 07/12/2011 02:39:11 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-actions.php
r4647 r4648 282 282 global $bp, $wp_query; 283 283 284 if ( !bp_is_active( 'groups' ) || !bp_is_current_component( 'activity' ) || !bp_is_user() || !bp_is_current_action( $bp->groups->slug) || !isset( $bp->action_variables[0] ) || $bp->action_variables[0] != 'feed' )284 if ( !bp_is_active( 'groups' ) || !bp_is_current_component( 'activity' ) || !bp_is_user() || !bp_is_current_action( bp_get_groups_slug() ) || !isset( $bp->action_variables[0] ) || $bp->action_variables[0] != 'feed' ) 285 285 return false; 286 286 -
trunk/bp-activity/bp-activity-loader.php
r4647 r4648 165 165 $sub_nav[] = array( 166 166 'name' => __( 'Groups', 'buddypress' ), 167 'slug' => $bp->groups->slug,167 'slug' => bp_get_groups_slug(), 168 168 'parent_url' => $activity_link, 169 169 'parent_slug' => $this->slug, -
trunk/bp-core/bp-core-template.php
r4638 r4648 1022 1022 global $bp; 1023 1023 1024 if ( bp_is_ current_component( 'groups') && isset( $bp->groups->current_group ) && $bp->groups->current_group )1024 if ( bp_is_groups_component() && isset( $bp->groups->current_group ) && $bp->groups->current_group ) 1025 1025 return true; 1026 1026 … … 1031 1031 global $bp; 1032 1032 1033 if ( bp_is_single_item() && bp_is_ current_component( 'groups') && ( !bp_current_action() || bp_is_current_action( 'home' ) ) )1033 if ( bp_is_single_item() && bp_is_groups_component() && ( !bp_current_action() || bp_is_current_action( 'home' ) ) ) 1034 1034 return true; 1035 1035 … … 1040 1040 global $bp; 1041 1041 1042 if ( bp_is_ current_component( 'groups') && bp_is_current_action( 'create' ) )1042 if ( bp_is_groups_component() && bp_is_current_action( 'create' ) ) 1043 1043 return true; 1044 1044 … … 1049 1049 global $bp; 1050 1050 1051 if ( bp_is_single_item() && bp_is_ current_component( 'groups') && bp_is_current_action( 'admin' ) )1051 if ( bp_is_single_item() && bp_is_groups_component() && bp_is_current_action( 'admin' ) ) 1052 1052 return true; 1053 1053 … … 1058 1058 global $bp; 1059 1059 1060 if ( bp_is_single_item() && bp_is_ current_component( 'groups') && bp_is_current_action( 'forum' ) )1060 if ( bp_is_single_item() && bp_is_groups_component() && bp_is_current_action( 'forum' ) ) 1061 1061 return true; 1062 1062 … … 1067 1067 global $bp; 1068 1068 1069 if ( bp_is_single_item() && bp_is_ current_component( 'groups') && bp_is_current_action( 'activity' ) )1069 if ( bp_is_single_item() && bp_is_groups_component() && bp_is_current_action( 'activity' ) ) 1070 1070 return true; 1071 1071 … … 1076 1076 global $bp; 1077 1077 1078 if ( bp_is_single_item() && bp_is_ current_component( 'groups') && bp_is_current_action( 'forum' ) && isset( $bp->action_variables[0] ) && 'topic' == $bp->action_variables[0] )1078 if ( bp_is_single_item() && bp_is_groups_component() && bp_is_current_action( 'forum' ) && isset( $bp->action_variables[0] ) && 'topic' == $bp->action_variables[0] ) 1079 1079 return true; 1080 1080 … … 1085 1085 global $bp; 1086 1086 1087 if ( bp_is_single_item() && bp_is_ current_component( 'groups') && bp_is_current_action( 'forum' ) && isset( $bp->action_variables[0] ) && 'topic' == $bp->action_variables[0] && isset( $bp->action_variables[2] ) && 'edit' == $bp->action_variables[2] )1087 if ( bp_is_single_item() && bp_is_groups_component() && bp_is_current_action( 'forum' ) && isset( $bp->action_variables[0] ) && 'topic' == $bp->action_variables[0] && isset( $bp->action_variables[2] ) && 'edit' == $bp->action_variables[2] ) 1088 1088 return true; 1089 1089 … … 1094 1094 global $bp; 1095 1095 1096 if ( bp_is_single_item() && bp_is_ current_component( 'groups') && bp_is_current_action( 'members' ) )1096 if ( bp_is_single_item() && bp_is_groups_component() && bp_is_current_action( 'members' ) ) 1097 1097 return true; 1098 1098 … … 1103 1103 global $bp; 1104 1104 1105 if ( bp_is_ current_component( 'groups') && bp_is_current_action( 'send-invites' ) )1105 if ( bp_is_groups_component() && bp_is_current_action( 'send-invites' ) ) 1106 1106 return true; 1107 1107 … … 1112 1112 global $bp; 1113 1113 1114 if ( bp_is_ current_component( 'groups') && bp_is_current_action( 'request-membership' ) )1114 if ( bp_is_groups_component() && bp_is_current_action( 'request-membership' ) ) 1115 1115 return true; 1116 1116 … … 1121 1121 global $bp; 1122 1122 1123 if ( bp_is_ current_component( 'groups') && bp_is_single_item() && bp_is_current_action( 'leave-group' ) )1123 if ( bp_is_groups_component() && bp_is_single_item() && bp_is_current_action( 'leave-group' ) ) 1124 1124 return true; 1125 1125 … … 1130 1130 global $bp; 1131 1131 1132 if ( bp_is_ current_component( 'groups') && bp_is_single_item() )1132 if ( bp_is_groups_component() && bp_is_single_item() ) 1133 1133 return true; 1134 1134 -
trunk/bp-forums/bp-forums-template.php
r4301 r4648 931 931 932 932 // Current topic forum_id needs to match current_group forum_id 933 if ( bp_is_ current_component( 'groups') && $topic_template->forum_id != groups_get_groupmeta( $bp->groups->current_group->id, 'forum_id' ) )933 if ( bp_is_groups_component() && $topic_template->forum_id != groups_get_groupmeta( $bp->groups->current_group->id, 'forum_id' ) ) 934 934 return false; 935 935 } -
trunk/bp-groups/bp-groups-actions.php
r4524 r4648 14 14 15 15 // If we're not at domain.org/groups/create/ then return false 16 if ( !bp_is_ current_component( 'groups') || !bp_is_current_action( 'create' ) )16 if ( !bp_is_groups_component() || !bp_is_current_action( 'create' ) ) 17 17 return false; 18 18 … … 199 199 global $bp; 200 200 201 if ( !bp_is_single_item() || !bp_is_ current_component( 'groups') || !bp_is_current_action( 'join' ) )201 if ( !bp_is_single_item() || !bp_is_groups_component() || !bp_is_current_action( 'join' ) ) 202 202 return false; 203 203 … … 234 234 global $bp; 235 235 236 if ( !bp_is_single_item() || !bp_is_ current_component( 'groups') || !bp_is_current_action( 'leave-group' ) )236 if ( !bp_is_single_item() || !bp_is_groups_component() || !bp_is_current_action( 'leave-group' ) ) 237 237 return false; 238 238 … … 259 259 global $bp; 260 260 261 if ( !bp_is_ current_component( 'groups') || !bp_is_current_action( 'create' ) )261 if ( !bp_is_groups_component() || !bp_is_current_action( 'create' ) ) 262 262 return false; 263 263 … … 283 283 global $bp, $wpdb; 284 284 285 if ( bp_is_ current_component( $bp->groups->slug) && isset( $_GET['random-group'] ) ) {285 if ( bp_is_groups_component() && isset( $_GET['random-group'] ) ) { 286 286 $group = groups_get_groups( array( 'type' => 'random', 'per_page' => 1 ) ); 287 287 288 bp_core_redirect( bp_get_root_domain() . '/' . $bp->groups->slug. '/' . $group['groups'][0]->slug . '/' );288 bp_core_redirect( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/' . $group['groups'][0]->slug . '/' ); 289 289 } 290 290 } … … 294 294 global $bp, $wp_query; 295 295 296 if ( !bp_is_active( 'activity' ) || !bp_is_ current_component( 'groups') || !isset( $bp->groups->current_group ) || !bp_is_current_action( 'feed' ) )296 if ( !bp_is_active( 'activity' ) || !bp_is_groups_component() || !isset( $bp->groups->current_group ) || !bp_is_current_action( 'feed' ) ) 297 297 return false; 298 298 -
trunk/bp-groups/bp-groups-classes.php
r4618 r4648 1180 1180 if ( $this->visibility == 'public' || ( $this->visibility != 'public' && $bp->groups->current_group->user_has_access ) ) { 1181 1181 if ( $this->enable_nav_item ) { 1182 if ( bp_is_ current_component( 'groups') && $bp->is_single_item ) {1182 if ( bp_is_groups_component() && $bp->is_single_item ) { 1183 1183 bp_core_new_subnav_item( array( 'name' => ( !$this->nav_item_name ) ? $this->name : $this->nav_item_name, 'slug' => $this->slug, 'parent_slug' => $bp->groups->current_group->slug, 'parent_url' => bp_get_group_permalink( $bp->groups->current_group ), 'position' => $this->nav_item_position, 'item_css_id' => 'nav-' . $this->slug, 'screen_function' => array( &$this, '_display_hook' ), 'user_has_access' => $this->enable_nav_item ) ); 1184 1184 } 1185 1185 1186 1186 // When we are viewing the extension display page, set the title and options title 1187 if ( bp_is_ current_component( 'groups') && $bp->is_single_item && $bp->current_action == $this->slug ) {1187 if ( bp_is_groups_component() && $bp->is_single_item && $bp->current_action == $this->slug ) { 1188 1188 add_action( 'bp_template_content_header', create_function( '', 'echo "' . esc_attr( $this->name ) . '";' ) ); 1189 1189 add_action( 'bp_template_title', create_function( '', 'echo "' . esc_attr( $this->name ) . '";' ) ); … … 1192 1192 1193 1193 // Hook the group home widget 1194 if ( bp_is_ current_component( 'groups') && $bp->is_single_item && ( !$bp->current_action || 'home' == $bp->current_action ) )1194 if ( bp_is_groups_component() && $bp->is_single_item && ( !$bp->current_action || 'home' == $bp->current_action ) ) 1195 1195 add_action( $this->display_hook, array( &$this, 'widget_display' ) ); 1196 1196 } … … 1201 1201 1202 1202 // Catch the edit screen and forward it to the plugin template 1203 if ( bp_is_ current_component( 'groups') && bp_is_current_action( 'admin' ) && !empty( $bp->action_variables[0] ) && $this->slug == $bp->action_variables[0] ) {1203 if ( bp_is_groups_component() && bp_is_current_action( 'admin' ) && !empty( $bp->action_variables[0] ) && $this->slug == $bp->action_variables[0] ) { 1204 1204 // Check whether the user is saving changes 1205 1205 $this->edit_screen_save(); -
trunk/bp-groups/bp-groups-functions.php
r4632 r4648 198 198 199 199 // Remove all notifications for any user belonging to this group 200 bp_core_delete_all_notifications_by_type( $group_id, $bp->groups-> slug);200 bp_core_delete_all_notifications_by_type( $group_id, $bp->groups->id ); 201 201 202 202 // Remove forum if component is active and current group has one -
trunk/bp-groups/bp-groups-notifications.php
r4638 r4648 218 218 $settings_link = bp_core_get_user_domain( $invited_user_id ) . bp_get_settings_slug() . '/notifications/'; 219 219 $invited_link = bp_core_get_user_domain( $invited_user_id ); 220 $invites_link = $invited_link . $bp->groups->slug. '/invites';220 $invites_link = $invited_link . bp_get_groups_slug() . '/invites'; 221 221 222 222 // Set up and send the message -
trunk/bp-groups/bp-groups-screens.php
r4646 r4648 454 454 global $bp; 455 455 456 if ( !bp_is_ current_component( 'groups') || !bp_is_current_action( 'admin' ) )456 if ( !bp_is_groups_component() || !bp_is_current_action( 'admin' ) ) 457 457 return false; 458 458 … … 466 466 global $bp; 467 467 468 if ( bp_is_ current_component( 'groups') && isset( $bp->action_variables[0] ) && 'edit-details' == $bp->action_variables[0] ) {468 if ( bp_is_groups_component() && isset( $bp->action_variables[0] ) && 'edit-details' == $bp->action_variables[0] ) { 469 469 470 470 if ( $bp->is_item_admin || $bp->is_item_mod ) { … … 498 498 global $bp; 499 499 500 if ( bp_is_ current_component( 'groups') && isset( $bp->action_variables[0] ) && 'group-settings' == $bp->action_variables[0] ) {500 if ( bp_is_groups_component() && isset( $bp->action_variables[0] ) && 'group-settings' == $bp->action_variables[0] ) { 501 501 502 502 if ( !$bp->is_item_admin ) … … 540 540 global $bp; 541 541 542 if ( bp_is_ current_component( 'groups') && isset( $bp->action_variables[0] ) && 'group-avatar' == $bp->action_variables[0] ) {542 if ( bp_is_groups_component() && isset( $bp->action_variables[0] ) && 'group-avatar' == $bp->action_variables[0] ) { 543 543 544 544 if ( !$bp->is_item_admin ) … … 598 598 global $bp; 599 599 600 if ( bp_is_ current_component( 'groups') && isset( $bp->action_variables[0] ) && 'manage-members' == $bp->action_variables[0] ) {600 if ( bp_is_groups_component() && isset( $bp->action_variables[0] ) && 'manage-members' == $bp->action_variables[0] ) { 601 601 602 602 if ( !$bp->is_item_admin ) … … 708 708 global $bp; 709 709 710 if ( bp_is_ current_component( 'groups') && isset( $bp->action_variables[0] ) && 'membership-requests' == $bp->action_variables[0] ) {710 if ( bp_is_groups_component() && isset( $bp->action_variables[0] ) && 'membership-requests' == $bp->action_variables[0] ) { 711 711 712 712 // Ask for a login if the user is coming here via an email notification … … 761 761 global $bp; 762 762 763 if ( bp_is_ current_component( 'groups') && isset( $bp->action_variables[0] ) && 'delete-group' == $bp->action_variables[0] ) {763 if ( bp_is_groups_component() && isset( $bp->action_variables[0] ) && 'delete-group' == $bp->action_variables[0] ) { 764 764 765 765 if ( !$bp->is_item_admin && !is_super_admin() ) … … 781 781 do_action( 'groups_group_deleted', $bp->groups->current_group->id ); 782 782 783 bp_core_redirect( $bp->loggedin_user->domain . $bp->groups->slug. '/' );783 bp_core_redirect( $bp->loggedin_user->domain . bp_get_groups_slug() . '/' ); 784 784 } 785 785 -
trunk/bp-groups/bp-groups-template.php
r4646 r4648 654 654 global $groups_template, $bp; 655 655 656 $action = $bp->displayed_user->domain . $bp->groups->slug. '/my-groups/search/';656 $action = $bp->displayed_user->domain . bp_get_groups_slug() . '/my-groups/search/'; 657 657 $label = __('Filter Groups', 'buddypress'); 658 658 $name = 'group-filter-box'; … … 679 679 function bp_group_is_activity_permalink() { 680 680 681 if ( !bp_is_single_item() || !bp_is_ current_component( 'groups') || !bp_is_current_action( bp_get_activity_slug() ) )681 if ( !bp_is_single_item() || !bp_is_groups_component() || !bp_is_current_action( bp_get_activity_slug() ) ) 682 682 return false; 683 683 … … 1377 1377 $group =& $groups_template->group; 1378 1378 1379 return apply_filters( 'bp_get_group_accept_invite_link', wp_nonce_url( $bp->loggedin_user->domain . $bp->groups->slug. '/invites/accept/' . $group->id, 'groups_accept_invite' ) );1379 return apply_filters( 'bp_get_group_accept_invite_link', wp_nonce_url( $bp->loggedin_user->domain . bp_get_groups_slug() . '/invites/accept/' . $group->id, 'groups_accept_invite' ) ); 1380 1380 } 1381 1381 … … 1389 1389 $group =& $groups_template->group; 1390 1390 1391 return apply_filters( 'bp_get_group_reject_invite_link', wp_nonce_url( $bp->loggedin_user->domain . $bp->groups->slug. '/invites/reject/' . $group->id, 'groups_reject_invite' ) );1391 return apply_filters( 'bp_get_group_reject_invite_link', wp_nonce_url( $bp->loggedin_user->domain . bp_get_groups_slug() . '/invites/reject/' . $group->id, 'groups_reject_invite' ) ); 1392 1392 } 1393 1393 … … 1996 1996 1997 1997 /* Make sure we are in the groups component */ 1998 if ( !bp_is_ current_component( 'groups' ) ||!bp_is_current_action( 'create' ) )1998 if ( !bp_is_groups_component() || !bp_is_current_action( 'create' ) ) 1999 1999 return false; 2000 2000 … … 2152 2152 } 2153 2153 2154 return apply_filters( 'bp_get_group_creation_previous_link', $bp->loggedin_user->domain . $bp->groups->slug. '/create/step/' . array_pop( $previous_steps ) );2154 return apply_filters( 'bp_get_group_creation_previous_link', $bp->loggedin_user->domain . bp_get_groups_slug() . '/create/step/' . array_pop( $previous_steps ) ); 2155 2155 } 2156 2156 … … 2235 2235 global $bp, $create_group_step, $completed_to_step; 2236 2236 ?> 2237 <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->groups->slug?>/my-groups/recently-active"><?php _e( 'Recently Active', 'buddypress' ) ?></a></li>2238 <li<?php if ( 'recently-joined' == $bp->action_variables[0] ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . $bp->groups->slug?>/my-groups/recently-joined"><?php _e( 'Recently Joined', 'buddypress' ) ?></a></li>2239 <li<?php if ( 'most-popular' == $bp->action_variables[0] ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . $bp->groups->slug?>/my-groups/most-popular"><?php _e( 'Most Popular', 'buddypress' ) ?></a></li>2240 <li<?php if ( 'admin-of' == $bp->action_variables[0] ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . $bp->groups->slug?>/my-groups/admin-of"><?php _e( 'Administrator Of', 'buddypress' ) ?></a></li>2241 <li<?php if ( 'mod-of' == $bp->action_variables[0] ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . $bp->groups->slug?>/my-groups/mod-of"><?php _e( 'Moderator Of', 'buddypress' ) ?></a></li>2242 <li<?php if ( 'alphabetically' == $bp->action_variables[0] ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . $bp->groups->slug?>/my-groups/alphabetically"><?php _e( 'Alphabetically', 'buddypress' ) ?></a></li>2237 <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_groups_slug() ?>/my-groups/recently-active"><?php _e( 'Recently Active', 'buddypress' ) ?></a></li> 2238 <li<?php if ( 'recently-joined' == $bp->action_variables[0] ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . bp_get_groups_slug() ?>/my-groups/recently-joined"><?php _e( 'Recently Joined', 'buddypress' ) ?></a></li> 2239 <li<?php if ( 'most-popular' == $bp->action_variables[0] ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . bp_get_groups_slug() ?>/my-groups/most-popular"><?php _e( 'Most Popular', 'buddypress' ) ?></a></li> 2240 <li<?php if ( 'admin-of' == $bp->action_variables[0] ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . bp_get_groups_slug() ?>/my-groups/admin-of"><?php _e( 'Administrator Of', 'buddypress' ) ?></a></li> 2241 <li<?php if ( 'mod-of' == $bp->action_variables[0] ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . bp_get_groups_slug() ?>/my-groups/mod-of"><?php _e( 'Moderator Of', 'buddypress' ) ?></a></li> 2242 <li<?php if ( 'alphabetically' == $bp->action_variables[0] ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . bp_get_groups_slug() ?>/my-groups/alphabetically"><?php _e( 'Alphabetically', 'buddypress' ) ?></a></li> 2243 2243 <?php 2244 2244 do_action( 'groups_header_tabs' ); … … 2276 2276 global $bp; 2277 2277 2278 if ( !bp_is_ current_component( 'groups') || !bp_is_current_action( 'admin' ) )2278 if ( !bp_is_groups_component() || !bp_is_current_action( 'admin' ) ) 2279 2279 return false; 2280 2280 -
trunk/bp-groups/bp-groups-widgets.php
r4211 r4648 46 46 <?php if ( bp_has_groups( 'user_id=' . $user_id . '&type=' . $instance['group_default'] . '&max=' . $instance['max_groups'] ) ) : ?> 47 47 <div class="item-options" id="groups-list-options"> 48 <a href="<?php echo site_url( ) . '/' . $bp->groups->slug?>" id="newest-groups"<?php if ( $instance['group_default'] == 'newest' ) : ?> class="selected"<?php endif; ?>><?php _e("Newest", 'buddypress') ?></a> |49 <a href="<?php echo site_url( ) . '/' . $bp->groups->slug?>" id="recently-active-groups"<?php if ( $instance['group_default'] == 'active' ) : ?> class="selected"<?php endif; ?>><?php _e("Active", 'buddypress') ?></a> |50 <a href="<?php echo site_url( ) . '/' . $bp->groups->slug?>" id="popular-groups" <?php if ( $instance['group_default'] == 'popular' ) : ?> class="selected"<?php endif; ?>><?php _e("Popular", 'buddypress') ?></a>48 <a href="<?php echo site_url( bp_get_groups_root_slug() ); ?>" id="newest-groups"<?php if ( $instance['group_default'] == 'newest' ) : ?> class="selected"<?php endif; ?>><?php _e("Newest", 'buddypress') ?></a> | 49 <a href="<?php echo site_url( bp_get_groups_root_slug() ); ?>" id="recently-active-groups"<?php if ( $instance['group_default'] == 'active' ) : ?> class="selected"<?php endif; ?>><?php _e("Active", 'buddypress') ?></a> | 50 <a href="<?php echo site_url( bp_get_groups_root_slug() ); ?>" id="popular-groups" <?php if ( $instance['group_default'] == 'popular' ) : ?> class="selected"<?php endif; ?>><?php _e("Popular", 'buddypress') ?></a> 51 51 <span class="ajax-loader" id="ajax-loader-groups"></span> 52 52 </div> -
trunk/bp-themes/bp-default/_inc/ajax.php
r4647 r4648 385 385 echo '<span class="activity">' . esc_attr( $user->last_active ) . '</span>'; 386 386 echo '<div class="action"> 387 <a class="button remove" href="' . wp_nonce_url( $bp->loggedin_user->domain . $bp->groups->slug. '/' . $_POST['group_id'] . '/invites/remove/' . $user->id, 'groups_invite_uninvite_user' ) . '" id="uid-' . esc_attr( $user->id ) . '">' . __( 'Remove Invite', 'buddypress' ) . '</a>387 <a class="button remove" href="' . wp_nonce_url( $bp->loggedin_user->domain . bp_get_groups_slug() . '/' . $_POST['group_id'] . '/invites/remove/' . $user->id, 'groups_invite_uninvite_user' ) . '" id="uid-' . esc_attr( $user->id ) . '">' . __( 'Remove Invite', 'buddypress' ) . '</a> 388 388 </div>'; 389 389 echo '</li>';
Note: See TracChangeset
for help on using the changeset viewer.