Make WordPress Core

Opened 4 years ago

Last modified 18 months ago

#20352 new enhancement

Use str_getcsv() to parse search terms in WP_Query — at Version 2

Reported by: scribu Owned by:
Milestone: Future Release Priority: normal
Severity: minor Version:
Component: Query Keywords: has-patch needs-refresh needs-unit-tests
Focuses: Cc:

Description (last modified by scribu)

We use an ugly regex to split search terms like these:

term1 term2 "exact match"

We could use str_getcsv() instead, for better readability.

Change History (3)

comment:1 @scribu4 years ago

kurtpayne mentioned in IRC a PHP 5.2 implementation for str_getcsv():


comment:2 @scribu4 years ago

  • Description modified (diff)

@scribu4 years ago

Note: See TracTickets for help on using tickets.