Changeset 9466
- Timestamp:
- 02/09/2015 11:34:12 PM (10 years ago)
- Location:
- trunk/src
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/src/bp-core/deprecated/2.1.php ¶
r9458 r9466 344 344 <?php if ( bp_is_active( 'groups' ) ) : ?> 345 345 346 <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>346 <li class="alt"><a href="<?php bp_groups_directory_permalink(); ?>?random-group" rel="nofollow"><?php _e( 'Random Group', 'buddypress' ) ?></a></li> 347 347 348 348 <?php endif; ?> -
TabularUnified trunk/src/bp-forums/bp-forums-template.php ¶
r9383 r9466 1009 1009 1010 1010 // Currently this will only work with group forums, extended support in the future 1011 if ( bp_is_active( 'groups' ) ) 1012 $permalink = trailingslashit( bp_get_ root_domain() . '/' . bp_get_groups_root_slug() . '/'. bp_get_the_topic_object_slug() . '/forum' );1013 else1011 if ( bp_is_active( 'groups' ) ) { 1012 $permalink = trailingslashit( bp_get_groups_directory_permalink() . bp_get_the_topic_object_slug() . '/forum' ); 1013 } else { 1014 1014 $permalink = ''; 1015 } 1015 1016 1016 1017 /** … … 1426 1427 */ 1427 1428 function bp_get_the_topic_permalink() { 1428 global $forum_template , $bp;1429 global $forum_template; 1429 1430 1430 1431 // The topic is in a loop where its parent object is loaded 1431 1432 if ( bp_get_the_topic_object_slug() ) { 1432 $permalink = trailingslashit( bp_get_ root_domain() . '/' . bp_get_groups_root_slug() . '/'. bp_get_the_topic_object_slug() . '/forum' );1433 $permalink = trailingslashit( bp_get_groups_directory_permalink() . bp_get_the_topic_object_slug() . '/forum' ); 1433 1434 1434 1435 // We are viewing a single group topic, so use the current item 1435 1436 } elseif ( bp_is_group_forum_topic() ) { 1436 $permalink = trailingslashit( bp_get_ root_domain() . '/' . bp_get_groups_root_slug() . '/'. bp_current_item() . '/forum' );1437 $permalink = trailingslashit( bp_get_groups_directory_permalink() . bp_current_item() . '/forum' ); 1437 1438 1438 1439 // We are unsure what the context is, so fallback to forum root slug … … 2712 2713 */ 2713 2714 function bp_get_forum_permalink( $forum_id = 0 ) { 2714 global $bp;2715 2715 2716 2716 if ( bp_is_groups_component() ) { 2717 $permalink = trailingslashit( bp_get_ root_domain() . '/' . bp_get_groups_root_slug() . '/'. bp_current_item() . '/forum' );2717 $permalink = trailingslashit( bp_get_groups_directory_permalink() . bp_current_item() . '/forum' ); 2718 2718 } else { 2719 2719 if ( empty( $forum_id ) ) { -
TabularUnified trunk/src/bp-groups/bp-groups-actions.php ¶
r9451 r9466 107 107 if ( !bp_user_can_create_groups() ) { 108 108 bp_core_add_message( __( 'Sorry, you are not allowed to create groups.', 'buddypress' ), 'error' ); 109 bp_core_redirect( trailingslashit( bp_get_root_domain() . '/' . bp_get_groups_root_slug()) );109 bp_core_redirect( bp_get_groups_directory_permalink() ); 110 110 } 111 111 … … 124 124 $reset_steps = true; 125 125 $keys = array_keys( $bp->groups->group_creation_steps ); 126 bp_core_redirect( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/create/step/' . array_shift( $keys ) . '/');126 bp_core_redirect( trailingslashit( bp_get_groups_directory_permalink() . 'create/step/' . array_shift( $keys ) ) ); 127 127 } 128 128 … … 130 130 if ( bp_get_groups_current_create_step() && empty( $bp->groups->group_creation_steps[bp_get_groups_current_create_step()] ) ) { 131 131 bp_core_add_message( __('There was an error saving group details. Please try again.', 'buddypress'), 'error' ); 132 bp_core_redirect( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/create/');132 bp_core_redirect( trailingslashit( bp_get_groups_directory_permalink() . 'create' ) ); 133 133 } 134 134 … … 145 145 if ( ! bp_is_group_creator( $bp->groups->current_group, bp_loggedin_user_id() ) ) { 146 146 bp_core_add_message( __( 'Only the group creator may continue editing this group.', 'buddypress' ), 'error' ); 147 bp_core_redirect( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/create/');147 bp_core_redirect( trailingslashit( bp_get_groups_directory_permalink() . 'create' ) ); 148 148 } 149 149 } … … 158 158 if ( empty( $_POST['group-name'] ) || empty( $_POST['group-desc'] ) || !strlen( trim( $_POST['group-name'] ) ) || !strlen( trim( $_POST['group-desc'] ) ) ) { 159 159 bp_core_add_message( __( 'Please fill in all of the required fields', 'buddypress' ), 'error' ); 160 bp_core_redirect( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/create/step/' . bp_get_groups_current_create_step() . '/');160 bp_core_redirect( trailingslashit( bp_get_groups_directory_permalink() . 'create/step/' . bp_get_groups_current_create_step() ) ); 161 161 } 162 162 … … 165 165 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' ) ) ) { 166 166 bp_core_add_message( __( 'There was an error saving group details. Please try again.', 'buddypress' ), 'error' ); 167 bp_core_redirect( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/create/step/' . bp_get_groups_current_create_step() . '/');167 bp_core_redirect( trailingslashit( bp_get_groups_directory_permalink() . 'create/step/' . bp_get_groups_current_create_step() ) ); 168 168 } 169 169 } … … 189 189 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 ) ) ) { 190 190 bp_core_add_message( __( 'There was an error saving group details. Please try again.', 'buddypress' ), 'error' ); 191 bp_core_redirect( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/create/step/' . bp_get_groups_current_create_step() . '/');191 bp_core_redirect( trailingslashit( bp_get_groups_directory_permalink() . 'create/step/' . bp_get_groups_current_create_step() ) ); 192 192 } 193 193 … … 295 295 } 296 296 297 bp_core_redirect( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/create/step/' . $next_step . '/');297 bp_core_redirect( trailingslashit( bp_get_groups_directory_permalink() . 'create/step/' . $next_step ) ); 298 298 } 299 299 } … … 314 314 315 315 bp_core_add_message( $message, $error ); 316 bp_core_redirect( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/create/step/group-invites/');316 bp_core_redirect( trailingslashit( bp_get_groups_directory_permalink() . 'create/step/group-invites' ) ); 317 317 } 318 318 … … 488 488 $group = BP_Groups_Group::get_random( 1, 1 ); 489 489 490 bp_core_redirect( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/' . $group['groups'][0]->slug . '/');490 bp_core_redirect( trailingslashit( bp_get_groups_directory_permalink() . $group['groups'][0]->slug ) ); 491 491 } 492 492 } -
TabularUnified trunk/src/bp-groups/bp-groups-admin.php ¶
r9351 r9466 524 524 525 525 <?php if ( is_user_logged_in() && bp_user_can_create_groups() ) : ?> 526 <a class="add-new-h2" href="<?php echo trailingslashit( bp_get_ root_domain() . '/' . bp_get_groups_root_slug() . '/create' ); ?>"><?php _e( 'Add New', 'buddypress' ); ?></a>526 <a class="add-new-h2" href="<?php echo trailingslashit( bp_get_groups_directory_permalink() . 'create' ); ?>"><?php _e( 'Add New', 'buddypress' ); ?></a> 527 527 <?php endif; ?> 528 528 … … 671 671 672 672 <?php if ( is_user_logged_in() && bp_user_can_create_groups() ) : ?> 673 <a class="add-new-h2" href="<?php echo trailingslashit( bp_get_ root_domain() . '/' . bp_get_groups_root_slug() . '/create' ); ?>"><?php _e( 'Add New', 'buddypress' ); ?></a>673 <a class="add-new-h2" href="<?php echo trailingslashit( bp_get_groups_directory_permalink() . 'create' ); ?>"><?php _e( 'Add New', 'buddypress' ); ?></a> 674 674 <?php endif; ?> 675 675 -
TabularUnified trunk/src/bp-groups/bp-groups-template.php ¶
r9465 r9466 925 925 global $groups_template; 926 926 927 if ( empty( $group ) ) 927 if ( empty( $group ) ) { 928 928 $group =& $groups_template->group; 929 930 return apply_filters( 'bp_get_group_permalink', trailingslashit( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/' . $group->slug . '/' ) ); 929 } 930 931 return apply_filters( 'bp_get_group_permalink', trailingslashit( bp_get_groups_directory_permalink() . $group->slug . '/' ) ); 931 932 } 932 933 … … 2891 2892 'link_title' => __( 'Create a Group', 'buddypress' ), 2892 2893 'link_class' => 'group-create no-ajax', 2893 'link_href' => trailingslashit( bp_get_ root_domain() ) . trailingslashit( bp_get_groups_root_slug() ) . trailingslashit('create' ),2894 'link_href' => trailingslashit( bp_get_groups_directory_permalink() . 'create' ), 2894 2895 'wrapper' => false, 2895 2896 'block_self' => false, … … 3637 3638 $is_enabled = bp_are_previous_group_creation_steps_complete( $slug ); ?> 3638 3639 3639 <li<?php if ( bp_get_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><?php3640 <li<?php if ( bp_get_groups_current_create_step() == $slug ) : ?> class="current"<?php endif; ?>><?php if ( $is_enabled ) : ?><a href="<?php bp_groups_directory_permalink(); ?>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 3640 3641 $counter++; 3641 3642 } … … 3663 3664 } 3664 3665 3665 return apply_filters( 'bp_get_group_creation_form_action', trailingslashit( bp_get_ root_domain() . '/' . bp_get_groups_root_slug() . '/create/step/' . bp_action_variable( 1 ) ) );3666 return apply_filters( 'bp_get_group_creation_form_action', trailingslashit( bp_get_groups_directory_permalink() . 'create/step/' . bp_action_variable( 1 ) ) ); 3666 3667 } 3667 3668 … … 3828 3829 } 3829 3830 3830 return apply_filters( 'bp_get_group_creation_previous_link', trailingslashit( bp_get_ root_domain() ) . bp_get_groups_root_slug() . '/create/step/' . array_pop( $previous_steps) );3831 return apply_filters( 'bp_get_group_creation_previous_link', trailingslashit( bp_get_groups_directory_permalink() . 'create/step/' . array_pop( $previous_steps ) ) ); 3831 3832 } 3832 3833 … … 4648 4649 4649 4650 if ( bp_is_current_action( 'create' ) ) { 4650 $uninvite_url = bp_get_ root_domain() . '/' . bp_get_groups_root_slug() . '/create/step/group-invites/?user_id=' . $user_id;4651 $uninvite_url = bp_get_groups_directory_permalink() . 'create/step/group-invites/?user_id=' . $user_id; 4651 4652 } else { 4652 4653 $uninvite_url = bp_get_group_permalink( groups_get_current_group() ) . 'send-invites/remove/' . $user_id; -
TabularUnified trunk/src/bp-groups/bp-groups-widgets.php ¶
r9453 r9466 72 72 echo $before_widget; 73 73 74 $title = !empty( $instance['link_title'] ) ? '<a href="' . trailingslashit( bp_get_root_domain() . '/' . bp_get_groups_root_slug()) . '">' . $title . '</a>' : $title;74 $title = !empty( $instance['link_title'] ) ? '<a href="' . bp_get_groups_directory_permalink() . '">' . $title . '</a>' : $title; 75 75 76 76 echo $before_title . $title . $after_title; -
TabularUnified trunk/src/bp-templates/bp-legacy/buddypress-functions.php ¶
r9399 r9466 1152 1152 $user = new BP_Core_User( $friend_id ); 1153 1153 1154 $uninvite_url = bp_is_current_action( 'create' ) ? bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/create/step/group-invites/?user_id=' . $friend_id : bp_get_group_permalink( $group ) . 'send-invites/remove/' . $friend_id; 1154 $uninvite_url = bp_is_current_action( 'create' ) 1155 ? bp_get_groups_directory_permalink() . 'create/step/group-invites/?user_id=' . $friend_id 1156 : bp_get_group_permalink( $group ) . 'send-invites/remove/' . $friend_id; 1155 1157 1156 1158 echo '<li id="uid-' . esc_attr( $user->id ) . '">'; -
TabularUnified trunk/src/bp-templates/bp-legacy/buddypress/forums/index.php ¶
r7965 r9466 125 125 <div id="message" class="info"> 126 126 127 <p><?php printf( __( "You are not a member of any groups so you don't have any group forums you can post in. To start posting, first find a group that matches the topic subject you'd like to start. If this group does not exist, why not <a href='%s'>create a new group</a>? Once you have joined or created the group you can post your topic in that group's forum.", 'buddypress' ), site_url( bp_get_groups_root_slug() . '/create/' ) ); ?></p>127 <p><?php printf( __( "You are not a member of any groups so you don't have any group forums you can post in. To start posting, first find a group that matches the topic subject you'd like to start. If this group does not exist, why not <a href='%s'>create a new group</a>? Once you have joined or created the group you can post your topic in that group's forum.", 'buddypress' ), trailingslashit( bp_get_groups_directory_permalink() . 'create' ) ); ?></p> 128 128 129 129 </div>
Note: See TracChangeset
for help on using the changeset viewer.