Changeset 9466 for trunk/src/bp-forums/bp-forums-template.php
- Timestamp:
- 02/09/2015 11:34:12 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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 ) ) {
Note: See TracChangeset
for help on using the changeset viewer.