groups_template_group_forum_topic_edit

  • apply_filters( 'groups_template_group_forum_topic_edit', 'groups/single/home' ) )

    Source Reference:

    • Component: BuddyPress :: bp-groups
      File: /bp-groups/bp-groups-screens.php :: Trac Source Line: 262
      					if ( !groups_update_group_forum_topic( $topic_id, $_POST['topic_title'], $_POST['topic_text'], $topic_tags ) )
      						bp_core_add_message( __( 'There was an error when editing that topic', 'buddypress'), 'error' );
      					else
      						bp_core_add_message( __( 'The topic was edited successfully', 'buddypress') );
      
      					do_action( 'groups_edit_forum_topic', $topic_id );
      					bp_core_redirect( bp_get_group_permalink( groups_get_current_group() ) . 'forum/topic/' . $topic_slug . '/' );
      				}
      
      				bp_core_load_template( apply_filters( 'groups_template_group_forum_topic_edit', 'groups/single/home' ) );
      			}
      
      			// Delete a post
      			else if ( empty( $user_is_banned ) && bp_is_action_variable( 'delete', 2 ) && $post_id = bp_action_variable( 4 ) ) {
      				// Fetch the post
      				$post = bp_forums_get_post( $post_id );
      
      				// Check the logged in user can edit this topic
      				if ( !$bp->is_item_admin && !$bp->is_item_mod && (int)$bp->loggedin_user->id != (int)$post->poster_id )
      					bp_core_redirect( wp_get_referer() );
      
    • Component: BuddyPress :: bp-groups
      File: /bp-groups/bp-groups-screens.php :: Trac Source Line: 315
      						bp_core_add_message( __( 'The post was edited successfully', 'buddypress') );
      
      					if ( $_SERVER['QUERY_STRING'] )
      						$query_vars = '?' . $_SERVER['QUERY_STRING'];
      
      					do_action( 'groups_edit_forum_post', $post_id );
      					bp_core_redirect( bp_get_group_permalink( $bp->groups->current_group ) . 'forum/topic/' . $topic_slug . '/' . $query_vars . '#post-' . $post_id );
      				}
      
      				bp_core_load_template( apply_filters( 'groups_template_group_forum_topic_edit', 'groups/single/home' ) );
      			}
      
      			// Standard topic display
      			else {
      				if ( !empty( $user_is_banned ) )
      					bp_core_add_message( __( "You have been banned from this group.", 'buddypress' ) );
      
      				bp_core_load_template( apply_filters( 'groups_template_group_forum_topic', 'groups/single/home' ) );
      			}
      

Comments are closed.