[wp-trac] [WordPress Trac] #25664: Behavior of the 'posts_search' filter has changed

WordPress Trac noreply at wordpress.org
Tue Oct 22 12:40:03 UTC 2013


#25664: Behavior of the 'posts_search' filter has changed
----------------------------+-----------------------
 Reporter:  SergeyBiryukov  |      Owner:
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  3.7
Component:  Query           |    Version:  trunk
 Severity:  normal          |   Keywords:  has-patch
----------------------------+-----------------------
 As [http://wordpress.org/support/topic/behavior-of-the-posts_search-
 filter-has-changed reported on the forums], [25632] changed the behaviour
 of the `posts_search` filter.

 In 3.6, the filter is applied unconditionally, even when the `'s'` query
 var is empty.

 In 3.7-RC1, the filter has been moved into `WP_Query::parse_search()`,
 which is only executed if `$q['s']` is not empty, so a plugin cannot add a
 search clause to a query if it doesn't have one.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/25664>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list