prefix, $wpdb->get_charset_collate() ); dbDelta( $statements[ $this->table_key() ] ); $table = $wpdb->prefix . 'hostkhata_' . $this->table_key(); foreach ( $this->columns() as $column ) { $found = $wpdb->get_var( $wpdb->prepare( "SHOW COLUMNS FROM {$table} LIKE %s", $column ) ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQL.NotPrepared,PluginCheck.Security.DirectDB.UnescapedDBParameter -- Table name is built from the prefix and a fixed suffix. if ( $column !== $found ) { throw new RuntimeException( sprintf( 'Column %s could not be added to %s.', $column, $table ) ); // phpcs:ignore WordPress.Security.EscapeOutput.ExceptionNotEscaped } } } }