bp_blogs_remove_data_for_blog

Remove the all data related to a given blog from the BP blogs tracker and activity stream.

Description

bp_blogs_remove_data_for_blog( (int) $blog_id ); 

Parameters (1)

0. $blog_id (int)
The ID of the blog to expunge.

Usage

  1. if ( !function_exists( 'bp_blogs_remove_data_for_blog' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-blogs/bp-blogs-functions.php'; 
  3.  
  4. // The ID of the blog to expunge. 
  5. $blog_id = -1; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bp_blogs_remove_data_for_blog($blog_id); 
  9.  

Defined (1)

The function is defined in the following location(s).

/bp-blogs/bp-blogs-functions.php  
  1. function bp_blogs_remove_data_for_blog( $blog_id ) { 
  2.  
  3. /** 
  4. * Fires before all data related to a given blog is removed from blogs tracker 
  5. * and activity stream. 
  6. * @since 1.5.0 
  7. * @param int $blog_id ID of the blog whose data is being removed. 
  8. */ 
  9.  
  10. // If this is regular blog, delete all data for that blog. 
  11. BP_Blogs_Blog::delete_blog_for_all( $blog_id ); 
  12.  
  13. /** 
  14. * Fires after all data related to a given blog has been removed from blogs tracker 
  15. * and activity stream. 
  16. * @since 1.0.0 
  17. * @param int $blog_id ID of the blog whose data is being removed. 
  18. */