#7418 closed enhancement (fixed)
Make group search more flexible.
Reported by: | dcavins | Owned by: | dcavins |
---|---|---|---|
Milestone: | 2.8 | Priority: | normal |
Severity: | normal | Version: | 2.7.2 |
Component: | Groups | Keywords: | has-patch |
Cc: | dcavins |
Description
While working on #6431, I realized that the group search could be more flexible, like the WP_User_Query
search that allows the specification of where the wildcard should be set and which columns should be searched.
I'm attaching a patch that mostly duplicates the logic of WP_User_Query
. The one difference is that our search has always assumed that the terms would be wild carded on both ends, so the default if no wildcard characters are detected is to follow the old behavior.
(Re #6431, then get_by_letter()
could just use get()
.)
Attachments (1)
Change History (6)
This ticket was mentioned in Slack in #buddypress by dcavins. View the logs.
8 years ago
This ticket was mentioned in Slack in #buddypress by dcavins. View the logs.
8 years ago
#3
@
8 years ago
Yeah, this looks like a good change. Shared code might be worth a BP_Core_Search_Utils
class or something in the long run, but not necessary for this ticket.
Add search_columns parameter and calculate wildcard placement in search string.