base_prefix . 'wsal_' . $table; // Using base_prefix because we don't have multiple tables on multisite. } /** * Drop a table from the DB. * * @param string $name - Name of the WSAL table (without prefix). */ private static function drop_table( $name ) { global $wpdb; $table_name = self::get_table( $name ); $wpdb->query( 'DROP TABLE IF EXISTS ' . $table_name ); } /** * Delete wsal options from wp_options table. */ public static function delete_options_from_wp_options() { global $wpdb; $plugin_options = $wpdb->get_results( "SELECT option_name FROM $wpdb->options WHERE option_name LIKE 'wsal_%'" ); foreach ( $plugin_options as $option ) { delete_option( $option->option_name ); } // @todo delete also options from site-level tables in multisite context } }