Make WordPress Core

Opened 16 years ago

Closed 15 years ago

#2777 closed defect (bug) (fixed)

query_string_array filter

Reported by: markjaquith Owned by:
Milestone: 2.1 Priority: normal
Severity: normal Version: 2.1
Component: Administration Keywords: hook filter
Focuses: Cc:


Right now, you can filter the query string, but it is passed, well, as a query string. So to do anything useful, you have to use parse_str(), and then get it back to its original form when you are done. How about a hook that extracts it all into an array first?

Check out the attached patch.

Attachments (1)

query_string_array.diff (628 bytes) - added by markjaquith 16 years ago.
Patch for /trunk/

Download all attachments as: .zip

Change History (3)

16 years ago

Patch for /trunk/

#1 @ryanscheuermann
16 years ago

+1 - Instead of parsing and then recreating again, why not have build_query_string create an array first (in the foreachs), filter that array, then create the query string from the filtered array? That way you can ensure the filtered query string is rawurlencoded (in case the plugin writer forgets or is unaware).

#2 @ryan
15 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [4129]) Deprecate query_string. Add 'request' filter to filter the array of query vars. Pass around arrays instead of query strings. fixes #2777

Note: See TracTickets for help on using tickets.