prefix . 'accessible_docs'; // $table_name is built from $wpdb->prefix and a literal string, it is safe. // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.DirectDatabaseQuery.SchemaChange $wpdb->query( "DROP TABLE IF EXISTS `{$table_name}`" ); delete_option( 'accessible_docs_settings' ); delete_option( 'accessible_docs_db_version' ); delete_transient( 'accessible_docs_access_token' ); wp_clear_scheduled_hook( 'accessible_docs_sync_statuses' ); // Popup texts are stored per language: accessible_docs_popup_options, accessible_docs_popup_options_en_US, … $option_names = $wpdb->get_col( $wpdb->prepare( "SELECT option_name FROM {$wpdb->options} WHERE option_name = %s OR option_name LIKE %s", 'accessible_docs_popup_options', $wpdb->esc_like( 'accessible_docs_popup_options_' ) . '%' ) ); foreach ( $option_names as $option_name ) { delete_option( $option_name ); } // Rate-limit counters. $wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->options} WHERE option_name LIKE %s OR option_name LIKE %s", $wpdb->esc_like( '_transient_accessible_docs_rl_' ) . '%', $wpdb->esc_like( '_transient_timeout_accessible_docs_rl_' ) . '%' ) ); } if ( is_multisite() ) { foreach ( get_sites( array( 'fields' => 'ids', 'number' => 0 ) ) as $group107_accessibledocs_site_id ) { switch_to_blog( $group107_accessibledocs_site_id ); group107_accessibledocs_uninstall_site(); restore_current_blog(); } } else { group107_accessibledocs_uninstall_site(); }