Changeset 4649
- Timestamp:
- 07/12/2011 02:49:17 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-buddybar.php
r4631 r4649 482 482 <?php if ( bp_is_active( 'groups' ) ) : ?> 483 483 484 <li class="alt"><a href="<?php echo trailingslashit( bp_get_root_domain() . '/' . $bp->groups->root_slug) . '?random-group' ?>" rel="nofollow"><?php _e( 'Random Group', 'buddypress' ) ?></a></li>484 <li class="alt"><a href="<?php echo trailingslashit( bp_get_root_domain() . '/' . bp_get_groups_root_slug() ) . '?random-group' ?>" rel="nofollow"><?php _e( 'Random Group', 'buddypress' ) ?></a></li> 485 485 486 486 <?php endif; ?> -
trunk/bp-core/bp-core-functions.php
r4638 r4649 837 837 838 838 case 'groups': 839 $slug = bp_is_active( 'groups' ) ? $bp->groups->root_slug: '';839 $slug = bp_is_active( 'groups' ) ? bp_get_groups_root_slug() : ''; 840 840 break; 841 841 -
trunk/bp-groups/bp-groups-actions.php
r4648 r4649 38 38 39 39 $reset_steps = true; 40 bp_core_redirect( bp_get_root_domain() . '/' . $bp->groups->root_slug. '/create/step/' . array_shift( array_keys( $bp->groups->group_creation_steps ) ) . '/' );40 bp_core_redirect( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/create/step/' . array_shift( array_keys( $bp->groups->group_creation_steps ) ) . '/' ); 41 41 } 42 42 … … 44 44 if ( $bp->action_variables[1] && !$bp->groups->group_creation_steps[$bp->action_variables[1]] ) { 45 45 bp_core_add_message( __('There was an error saving group details. Please try again.', 'buddypress'), 'error' ); 46 bp_core_redirect( bp_get_root_domain() . '/' . $bp->groups->root_slug. '/create/' );46 bp_core_redirect( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/create/' ); 47 47 } 48 48 … … 66 66 if ( empty( $_POST['group-name'] ) || empty( $_POST['group-desc'] ) || !strlen( trim( $_POST['group-name'] ) ) || !strlen( trim( $_POST['group-desc'] ) ) ) { 67 67 bp_core_add_message( __( 'Please fill in all of the required fields', 'buddypress' ), 'error' ); 68 bp_core_redirect( bp_get_root_domain() . '/' . $bp->groups->root_slug. '/create/step/' . $bp->groups->current_create_step . '/' );68 bp_core_redirect( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/create/step/' . $bp->groups->current_create_step . '/' ); 69 69 } 70 70 … … 73 73 if ( !$bp->groups->new_group_id = groups_create_group( array( 'group_id' => $new_group_id, 'name' => $_POST['group-name'], 'description' => $_POST['group-desc'], 'slug' => groups_check_slug( sanitize_title( esc_attr( $_POST['group-name'] ) ) ), 'date_created' => bp_core_current_time(), 'status' => 'public' ) ) ) { 74 74 bp_core_add_message( __( 'There was an error saving group details, please try again.', 'buddypress' ), 'error' ); 75 bp_core_redirect( bp_get_root_domain() . '/' . $bp->groups->root_slug. '/create/step/' . $bp->groups->current_create_step . '/' );75 bp_core_redirect( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/create/step/' . $bp->groups->current_create_step . '/' ); 76 76 } 77 77 … … 100 100 if ( !$bp->groups->new_group_id = groups_create_group( array( 'group_id' => $bp->groups->new_group_id, 'status' => $group_status, 'enable_forum' => $group_enable_forum ) ) ) { 101 101 bp_core_add_message( __( 'There was an error saving group details, please try again.', 'buddypress' ), 'error' ); 102 bp_core_redirect( bp_get_root_domain() . '/' . $bp->groups->root_slug. '/create/step/' . $bp->groups->current_create_step . '/' );102 bp_core_redirect( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/create/step/' . $bp->groups->current_create_step . '/' ); 103 103 } 104 104 … … 163 163 } 164 164 165 bp_core_redirect( bp_get_root_domain() . '/' . $bp->groups->root_slug. '/create/step/' . $next_step . '/' );165 bp_core_redirect( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/create/step/' . $next_step . '/' ); 166 166 } 167 167 } -
trunk/bp-groups/bp-groups-classes.php
r4648 r4649 1198 1198 // Construct the admin edit tab for the new group extension 1199 1199 if ( !empty( $this->enable_edit_item ) && !empty( $bp->is_item_admin ) ) { 1200 add_action( 'groups_admin_tabs', create_function( '$current, $group_slug', '$selected = ""; if ( "' . esc_attr( $this->slug ) . '" == $current ) $selected = " class=\"current\""; echo "<li{$selected}><a href=\"' . bp_get_root_domain() . '/' . $bp->groups->root_slug. '/{$group_slug}/admin/' . esc_attr( $this->slug ) . '\">' . esc_attr( $this->name ) . '</a></li>";' ), 10, 2 );1200 add_action( 'groups_admin_tabs', create_function( '$current, $group_slug', '$selected = ""; if ( "' . esc_attr( $this->slug ) . '" == $current ) $selected = " class=\"current\""; echo "<li{$selected}><a href=\"' . bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/{$group_slug}/admin/' . esc_attr( $this->slug ) . '\">' . esc_attr( $this->name ) . '</a></li>";' ), 10, 2 ); 1201 1201 1202 1202 // Catch the edit screen and forward it to the plugin template -
trunk/bp-groups/bp-groups-template.php
r4648 r4649 415 415 $group =& $groups_template->group; 416 416 417 return apply_filters( 'bp_get_group_permalink', bp_get_root_domain() . '/' . $bp->groups->root_slug. '/' . $group->slug . '/' );417 return apply_filters( 'bp_get_group_permalink', bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/' . $group->slug . '/' ); 418 418 } 419 419 … … 427 427 $group =& $groups_template->group; 428 428 429 return apply_filters( 'bp_get_group_admin_permalink', bp_get_root_domain() . '/' . $bp->groups->root_slug. '/' . $group->slug . '/admin' );429 return apply_filters( 'bp_get_group_admin_permalink', bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/' . $group->slug . '/admin' ); 430 430 } 431 431 … … 1241 1241 ?> 1242 1242 <?php if ( $bp->is_item_admin || $bp->is_item_mod ) { ?> 1243 <li<?php if ( 'edit-details' == $current_tab || empty( $current_tab ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo bp_get_root_domain() . '/' . $bp->groups->root_slug ?>/<?php echo$group->slug ?>/admin/edit-details"><?php _e( 'Details', 'buddypress' ); ?></a></li>1243 <li<?php if ( 'edit-details' == $current_tab || empty( $current_tab ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/' . $group->slug ?>/admin/edit-details"><?php _e( 'Details', 'buddypress' ); ?></a></li> 1244 1244 <?php } ?> 1245 1245 … … 1248 1248 return false; 1249 1249 ?> 1250 <li<?php if ( 'group-settings' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo bp_get_root_domain() . '/' . $bp->groups->root_slug ?>/<?php echo$group->slug ?>/admin/group-settings"><?php _e( 'Settings', 'buddypress' ); ?></a></li>1251 <li<?php if ( 'group-avatar' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo bp_get_root_domain() . '/' . $bp->groups->root_slug ?>/<?php echo$group->slug ?>/admin/group-avatar"><?php _e( 'Avatar', 'buddypress' ); ?></a></li>1252 <li<?php if ( 'manage-members' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo bp_get_root_domain() . '/' . $bp->groups->root_slug ?>/<?php echo$group->slug ?>/admin/manage-members"><?php _e( 'Members', 'buddypress' ); ?></a></li>1250 <li<?php if ( 'group-settings' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/' . $group->slug ?>/admin/group-settings"><?php _e( 'Settings', 'buddypress' ); ?></a></li> 1251 <li<?php if ( 'group-avatar' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/' . $group->slug ?>/admin/group-avatar"><?php _e( 'Avatar', 'buddypress' ); ?></a></li> 1252 <li<?php if ( 'manage-members' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/' . $group->slug ?>/admin/manage-members"><?php _e( 'Members', 'buddypress' ); ?></a></li> 1253 1253 1254 1254 <?php if ( $groups_template->group->status == 'private' ) : ?> 1255 <li<?php if ( 'membership-requests' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo bp_get_root_domain() . '/' . $bp->groups->root_slug ?>/<?php echo$group->slug ?>/admin/membership-requests"><?php _e( 'Requests', 'buddypress' ); ?></a></li>1255 <li<?php if ( 'membership-requests' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/' . $group->slug ?>/admin/membership-requests"><?php _e( 'Requests', 'buddypress' ); ?></a></li> 1256 1256 <?php endif; ?> 1257 1257 1258 1258 <?php do_action( 'groups_admin_tabs', $current_tab, $group->slug ) ?> 1259 1259 1260 <li<?php if ( 'delete-group' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo bp_get_root_domain() . '/' . $bp->groups->root_slug ?>/<?php echo$group->slug ?>/admin/delete-group"><?php _e( 'Delete', 'buddypress' ); ?></a></li>1260 <li<?php if ( 'delete-group' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/' . $group->slug ?>/admin/delete-group"><?php _e( 'Delete', 'buddypress' ); ?></a></li> 1261 1261 <?php 1262 1262 } … … 1965 1965 $is_enabled = bp_are_previous_group_creation_steps_complete( $slug ); ?> 1966 1966 1967 <li<?php if ( $bp->groups->current_create_step == $slug ) : ?> class="current"<?php endif; ?>><?php if ( $is_enabled ) : ?><a href="<?php echo bp_get_root_domain() . '/' . $bp->groups->root_slug?>/create/step/<?php echo $slug ?>/"><?php else: ?><span><?php endif; ?><?php echo $counter ?>. <?php echo $step['name'] ?><?php if ( $is_enabled ) : ?></a><?php else: ?></span><?php endif ?></li><?php1967 <li<?php if ( $bp->groups->current_create_step == $slug ) : ?> class="current"<?php endif; ?>><?php if ( $is_enabled ) : ?><a href="<?php echo bp_get_root_domain() . '/' . bp_get_groups_root_slug() ?>/create/step/<?php echo $slug ?>/"><?php else: ?><span><?php endif; ?><?php echo $counter ?>. <?php echo $step['name'] ?><?php if ( $is_enabled ) : ?></a><?php else: ?></span><?php endif ?></li><?php 1968 1968 $counter++; 1969 1969 } … … 1989 1989 $bp->action_variables[1] = array_shift( array_keys( $bp->groups->group_creation_steps ) ); 1990 1990 1991 return apply_filters( 'bp_get_group_creation_form_action', bp_get_root_domain() . '/' . $bp->groups->root_slug. '/create/step/' . $bp->action_variables[1] );1991 return apply_filters( 'bp_get_group_creation_form_action', bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/create/step/' . $bp->action_variables[1] ); 1992 1992 } 1993 1993 … … 2730 2730 // Append $action to $url if there is no $type 2731 2731 if ( !empty( $action ) ) 2732 $url = bp_get_root_domain() . '/' . $bp->groups->root_slug. '/' . $bp->groups->current_group->slug . '/' . $action;2732 $url = bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/' . $bp->groups->current_group->slug . '/' . $action; 2733 2733 else 2734 $url = bp_get_root_domain() . '/' . $bp->groups->root_slug. '/' . $bp->groups->current_group->slug;2734 $url = bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/' . $bp->groups->current_group->slug; 2735 2735 2736 2736 // Add a slash at the end of our user url
Note: See TracChangeset
for help on using the changeset viewer.