wpmu_drop_tables
Filters the tables to drop when the site is deleted.
Usage
add_filter( 'wpmu_drop_tables', 'wp_kama_wpmu_drop_tables_filter', 10, 2 ); /** * Function for `wpmu_drop_tables` filter-hook. * * @param string[] $tables Array of names of the site tables to be dropped. * @param int $site_id The ID of the site to drop tables for. * * @return string[] */ function wp_kama_wpmu_drop_tables_filter( $tables, $site_id ){ // filter... return $tables; }
- $tables(string[])
- Array of names of the site tables to be dropped.
- $site_id(int)
- The ID of the site to drop tables for.
Changelog
Since 3.0.0 | Introduced. |
Where the hook is called
wpmu_drop_tables
wp-includes/ms-site.php 832
$drop_tables = apply_filters( 'wpmu_drop_tables', $tables, $site->id );