wpmu_drop_tables

Filters the tables to drop when the site is deleted.

Description

apply_filters( 'wpmu_drop_tables', (array) $tables, (int) $blog_id ); 

Parameters (2)

0. $tables (array)
The site tables to be dropped.
1. $blog_id (int)
The ID of the site to drop tables for.

Usage

To run the hook, copy the example below.
  1. $tables = apply_filters( 'wpmu_drop_tables', $tables, $blog_id ); 
  2.  
  3. if ( !empty( $tables ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the wpmu_drop_tables callback 
  2. function filter_wpmu_drop_tables( $tables, $blog_id ) { 
  3. // make filter magic happen here... 
  4. return $tables
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'wpmu_drop_tables', 'filter_wpmu_drop_tables', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'wpmu_drop_tables', 'filter_wpmu_drop_tables', 10, 2 ); 

Defined (1)

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

/wp-admin/includes/ms.php  
  1. $drop_tables = apply_filters( 'wpmu_drop_tables', $tables, $blog_id );