query( $wpdb->prepare( 'DROP TABLE IF EXISTS %i', $wpdb->prefix . $langferry_table ) ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery -- uninstalling removes the plugin's own tables. } foreach ( array( 'langferry_config', 'langferry_connection', 'langferry_db_version', 'langferry_activated_at', 'langferry_priority_cursor', 'langferry_priority_set_aside', 'langferry_queue', 'langferry_queue_lock', 'langferry_upgrade_lock', 'langferry_fetch_secret' ) as $langferry_option ) { delete_option( $langferry_option ); } $wpdb->query( $wpdb->prepare( 'DELETE FROM %i WHERE option_name LIKE %s OR option_name LIKE %s', $wpdb->options, $wpdb->esc_like( '_transient_' ) . '%' . $wpdb->esc_like( 'langferry_' ) . '%', $wpdb->esc_like( '_transient_timeout_' ) . '%' . $wpdb->esc_like( 'langferry_' ) . '%' ) ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery -- Langferry's transients, which WordPress has no API to list. wp_clear_scheduled_hook( 'langferry_hourly' ); wp_clear_scheduled_hook( 'langferry_queue' ); delete_metadata( 'user', 0, 'langferry_dismissed_connect', '', true );