groups_delete_forum_post

  • do_action( 'groups_delete_forum_post', $post_id )

    Source Reference:

    • Component: BuddyPress:: bp-groups
      File: /bp-groups/bp-groups-screens.php :: Trac Source Line: 284
      				check_admin_referer( 'bp_forums_delete_post' );
      
      				do_action( 'groups_before_delete_forum_post', $post_id );
      
      				if ( !groups_delete_group_forum_post( $post_id ) )
      					bp_core_add_message( __( 'There was an error deleting that post', 'buddypress'), 'error' );
      				else
      					bp_core_add_message( __( 'The post was deleted successfully', 'buddypress') );
      
      				do_action( 'groups_delete_forum_post', $post_id );
      				bp_core_redirect( wp_get_referer() );
      			}
      
      			// Editing a post
      			else if ( empty( $user_is_banned ) && bp_is_action_variable( 'edit', 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 )
      

Comments are closed.