'ids', ) ); foreach ( $sites as $site ) { switch_to_blog( $site ); self::uninstall(); restore_current_blog(); } } else { self::uninstall(); } } /** * Perform the actual uninstallation. * * Delete all tables and all options created by nLingual. * * @since 2.3.0 */ public static function uninstall() { global $wpdb; // Delete the object and string translation tables $wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}nl_translations" ); $wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}nl_localizations" ); // And delete all options that may exist foreach ( array( 'options', 'languages', 'database_version', 'upgraded', 'upgraded_options', 'upgraded_tables', ) as $option ) { delete_option( "nlingual_{$option}" ); } } } Uninstaller::run();