Changeset 10183 for trunk/src/bp-forums/bp-forums-screens.php
- Timestamp:
- 10/04/2015 07:29:24 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-forums/bp-forums-screens.php
r10096 r10183 15 15 function bp_forums_directory_forums_setup() { 16 16 17 // Get BuddyPress once 17 // Get BuddyPress once. 18 18 $bp = buddypress(); 19 19 … … 42 42 $bp->groups->current_group = groups_get_group( array( 'group_id' => $_POST['topic_group_id'] ) ); 43 43 if ( !empty( $bp->groups->current_group->id ) ) { 44 // Auto join this user if they are not yet a member of this group 44 // Auto join this user if they are not yet a member of this group. 45 45 if ( !bp_current_user_can( 'bp_moderate' ) && 'public' == $bp->groups->current_group->status && !groups_is_user_member( bp_loggedin_user_id(), $bp->groups->current_group->id ) ) 46 46 groups_join_group( $bp->groups->current_group->id ); … … 75 75 } 76 76 77 } 77 } else { 78 78 bp_core_add_message( __( 'Please pick the group forum where you would like to post this topic.', 'buddypress' ), 'error' ); 79 79 bp_core_redirect( add_query_arg( 'new', '', bp_get_forums_directory_permalink() ) ); … … 249 249 public function is_legacy_forum() { 250 250 251 // Bail if not looking at a group 251 // Bail if not looking at a group. 252 252 if ( ! bp_is_forums_component() ) 253 253 return; 254 254 255 // forum Directory255 // Forum Directory. 256 256 if ( ( ! bp_current_action() || ( 'tag' == bp_current_action() && bp_action_variables() ) ) && ! bp_current_item() ) { 257 257 … … 284 284 public function directory_dummy_post() { 285 285 286 // Title based on ability to create groups 286 // Title based on ability to create groups. 287 287 if ( is_user_logged_in() ) { 288 288 $title = __( 'Forums', 'buddypress' ) . ' <a class="button show-hide-new bp-title-button" href="#new-topic" id="new-topic-button">' . __( 'New Topic', 'buddypress' ) . '</a>';
Note: See TracChangeset
for help on using the changeset viewer.