Opened 14 years ago
Last modified 7 years ago
#20352 new enhancement
Use str_getcsv() to parse search terms in WP_Query
| Reported by: | scribu | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Query | Version: | |
| Severity: | normal | Keywords: | has-patch needs-refresh needs-unit-tests |
| Cc: | Focuses: |
Description (last modified by )
We use an ugly regex to split search terms like these:
term1 term2 "exact match"
We could use str_getcsv() instead, for better readability.
Attachments (1)
Change History (8)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
kurtpayne mentioned in IRC a PHP 5.2 implementation for str_getcsv():
http://unit-test.trac.wordpress.org/browser/wp-testlib/utils.php#L326