Open waldoj opened 11 years ago
The problem here appears to lie in WordPress's list_filter()
function.
As it turns out, the problem is a lot deeper than that. The problem is within query()
, which doesn't sanitize column names as it compares them to the input in the URL. So region code
isn't matched to region_code
, and it's discarded.
That's fixed pretty easily, like such:
// Fill in any defaults that are missing.
$query_vars = $this->get_query_vars( $data );
foreach ($query_vars as $key => $value) {
unset($query_vars[$key]);
$query_vars[ str_replace(' ', '_', $key) ] = $value;
}
Then the problem is with list_filter()
, because that also isn't making the proper comparison. So I've gotten partway done with this, but there's more to do.
Filtering by single-word column names (e.g.,
chamber
,size
,state
) works fine, but filtering by multi-word column names (e.g.,region code
,Building State
) does not, even with those column names are URL encoded (e.g.,region+code
orregion%20code
). Add in support for URL-encoded multi-word column names, and document the need to URL encode them (as opposed to represent spaces with hyphens or underscores).