[wp-trac] [WordPress Trac] #20044: Enable search for pages by slug

WordPress Trac noreply at wordpress.org
Sat Mar 8 12:40:57 UTC 2014


#20044: Enable search for pages by slug
-------------------------------------+------------------
 Reporter:  ekitomat                 |       Owner:
     Type:  enhancement              |      Status:  new
 Priority:  normal                   |   Milestone:  3.9
Component:  Query                    |     Version:  3.7
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:
-------------------------------------+------------------
Changes (by DrewAPicture):

 * keywords:  has-patch => has-patch needs-testing
 * severity:  trivial => normal


Comment:

 Replying to [comment:9 jeremyfelt]:
 > [https://core.trac.wordpress.org/attachment/ticket/20044/20044.4.diff
 20044.4.diff] checks anything passed in the filter against an array of
 allowed search fields—post_title, post_content, post_name, and
 post_excerpt—and then sets up the query.

 Just to be clear, the filter in [attachment:20044.4.diff] effectively
 expands the available search fields to also include `post_excerpt` and
 `post_name` *only*. Does it not limit the usefulness of the filter to say,
 "You can customize the search fields, but are limited to choosing within
 this list of four?".

 >
 > I left out other posts fields from the allowed list as they don't seem
 applicable. Docs added to the `query_search_fields` filter as well.

 Very nice :)

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


More information about the wp-trac mailing list