Opened 10 years ago
Closed 8 years ago
#28024 closed defect (bug) (worksforme)
WordPress doesn't honor array query vars
Reported by: | Denis-de-Bernardy | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.1 |
Component: | Query | Keywords: | |
Focuses: | Cc: |
Description
Since r4753, we're discarding arrays from the query vars. This makes the query_vars
filter useless in the event one is hoping to let WP parse and retrieve array variables passed in e.g. a form related to a custom post type.
Was there any good reason to do this, or was it simply premature and overzealous sanitization?
Change History (5)
#2
in reply to:
↑ 1
@
10 years ago
Replying to wonderboymusic:
Where is this not working?
add_action('template_redirect', function () { global $wp; var_dump($wp->query_string); die; });
Can't recall which WP function I needed that relied on query_string, but that was the issue.
Note: See
TracTickets for help on using
tickets.
Where is this not working?
Navigate to:
http://wordpress-core-develop/?denis[woo]=foo&denis[hoo]=bar
Result:
pre_get_posts
also works with arrays...