blog_id ); Installer::install(); restore_current_blog(); } /** * Adds the plugin tables to those dropped when a network site is deleted. * * Core drops only the tables it knows about, so deleting a subsite left its * five plugin tables - every entry anyone had submitted there - in the * database with nothing left pointing at them. Core has already switched to * the site being deleted when it applies this filter, so the prefix is right. * * @param mixed $tables Tables core is about to drop. * * @return array The tables, the plugin's included. */ public function drop_site_tables( mixed $tables ): array { $tables = is_array( $tables ) ? $tables : array(); foreach ( Schema::tables() as $table ) { $tables[] = Schema::table( $table ); } return $tables; } }