Changes between Version 2 and Version 3 of Ticket #43867, comment 1
- Timestamp:
- 04/26/2018 01:31:06 PM (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #43867, comment 1
v2 v3 1 1 That sounds like a useful feature. 2 2 3 For comparison, the way it's done in {{{WP_User_Query}}} is via the {{{user_search_columns}}} filter: 3 For comparison, the way it's done in {{{WP_User_Query}}} is with the {{{search_columns}}} query argument 4 5 https://core.trac.wordpress.org/browser/tags/4.9.5/src/wp-includes/class-wp-user-query.php#L163 6 7 and also the {{{user_search_columns}}} filter: 4 8 5 9 https://core.trac.wordpress.org/browser/tags/4.9.5/src/wp-includes/class-wp-user-query.php#L532 … … 21 25 }}} 22 26 23 Similar the {{{WP_Site_Query}}} uses the {{{site_search_columns}}} filter, with ''domain'' and ''path'' as default search columns. 27 Similar the {{{WP_Site_Query}}} uses the {{{search_columns}}} query argument: 28 29 https://core.trac.wordpress.org/browser/tags/4.9.5/src/wp-includes/class-wp-site-query.php#L137 30 31 and the {{{site_search_columns}}} filter, with ''domain'' and ''path'' as default search columns. 24 32 25 33 https://core.trac.wordpress.org/browser/tags/4.9.5/src/wp-includes/class-wp-site-query.php#L502 26 34 27 So another approach in the same direction as above, could be with a{{{post_search_columns}}} or {{{search_columns}}} filter.35 So taking a similar approach as above, we could support the {{{search_columns}}} query argument and the {{{post_search_columns}}} or {{{search_columns}}} filter. 28 36 29 I wonder now if one should support both, i.e. a ''search fields input argument'' and a ''search fields filter''?30