bp_blogs_remove_blog

  • do_action( 'bp_blogs_remove_blog', $blog_id )

    Source Reference:

    • Component: BuddyPress:: bp-blogs
      File: /bp-blogs/bp-blogs-functions.php :: Trac Source Line: 346
      	$blog_id = (int)$blog_id;
      	do_action( 'bp_blogs_before_remove_blog', $blog_id );
      
      	BP_Blogs_Blog::delete_blog_for_all( $blog_id );
      
      	// Delete activity stream item
      	bp_blogs_delete_activity( array( 'item_id' => $blog_id, 'component' => $bp->blogs->id, 'type' => 'new_blog' ) );
      
      	do_action( 'bp_blogs_remove_blog', $blog_id );
      }
      add_action( 'delete_blog', 'bp_blogs_remove_blog' );
      
      function bp_blogs_remove_blog_for_user( $user_id, $blog_id ) {
      	global $bp, $current_user;
      
      	$blog_id = (int)$blog_id;
      	$user_id = (int)$user_id;
      
      	do_action( 'bp_blogs_before_remove_blog_for_user', $blog_id, $user_id );
      

Hook: add_action: bp_blogs_remove_blog instances (1)

  • add_action( 'bp_blogs_remove_blog',          'bp_core_clear_cache' )
    $function_to_add: bp_core_clear_cache
    $priority: 0
    $accepted_args: 0

    Source Reference:

    • Component: BuddyPress :: bp-blogs
      File: /bp-blogs/bp-blogs-cache.php :: Trac Source Line: 31
      // List actions to clear object caches on
      add_action( 'bp_blogs_remove_blog_for_user', 'bp_blogs_clear_blog_object_cache', 10, 2 );
      add_action( 'bp_blogs_new_blog',             'bp_blogs_format_clear_blog_cache', 10, 2 );
      
      // List actions to clear super cached pages on, if super cache is installed
      add_action( 'bp_blogs_remove_data_for_blog', 'bp_core_clear_cache' );
      

Comments are closed.