[wp-trac] [WordPress Trac] #15249: Filtering get_search_sql for advanced queries

WordPress Trac noreply at wordpress.org
Sat May 10 18:02:27 UTC 2014


#15249: Filtering get_search_sql for advanced queries
-----------------------------------+-----------------------
 Reporter:  sc0ttkclark            |       Owner:
     Type:  enhancement            |      Status:  assigned
 Priority:  normal                 |   Milestone:  4.0
Component:  Query                  |     Version:  3.1
 Severity:  normal                 |  Resolution:
 Keywords:  has-patch 2nd-opinion  |     Focuses:  docs
-----------------------------------+-----------------------

Comment (by sc0ttkclark):

 +1 on get_search_sql single filter

 The use case here is for plugins like Pods which may add additional tables
 to WordPress, to be able to further refine a query to search values in the
 related table. For instance, someone can extend a Post Type with a table-
 based Pod, which lets you essentially create a table that contains columns
 of custom fields and only those fields that you need (each table has a
 matching id column that matches up to wp_posts).

 So, you could provide those custom fields in your query as normal, and
 Pods will detect if they are covered by the separate table or not, and
 adjust the query as needed, to be able to join it's table by ID and search
 that custom field column.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/15249#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list