Make WordPress Core

Changes between Version 2 and Version 3 of Ticket #43867, comment 1


Ignore:
Timestamp:
04/26/2018 01:31:06 PM (5 years ago)
Author:
birgire
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #43867, comment 1

    v2 v3  
    11That sounds like a useful feature.
    22
    3 For comparison, the way it's done in {{{WP_User_Query}}} is via the {{{user_search_columns}}} filter:
     3For comparison, the way it's done in {{{WP_User_Query}}} is with the {{{search_columns}}} query argument
     4
     5https://core.trac.wordpress.org/browser/tags/4.9.5/src/wp-includes/class-wp-user-query.php#L163
     6
     7and also the {{{user_search_columns}}} filter:
    48
    59https://core.trac.wordpress.org/browser/tags/4.9.5/src/wp-includes/class-wp-user-query.php#L532
     
    2125}}}
    2226
    23 Similar the {{{WP_Site_Query}}} uses the {{{site_search_columns}}} filter, with ''domain'' and ''path'' as  default search columns.
     27Similar the {{{WP_Site_Query}}} uses the {{{search_columns}}} query argument:
     28
     29https://core.trac.wordpress.org/browser/tags/4.9.5/src/wp-includes/class-wp-site-query.php#L137
     30
     31and the {{{site_search_columns}}} filter, with ''domain'' and ''path'' as  default search columns.
    2432
    2533https://core.trac.wordpress.org/browser/tags/4.9.5/src/wp-includes/class-wp-site-query.php#L502
    2634
    27 So another approach in the same direction as above, could be with a {{{post_search_columns}}} or {{{search_columns}}} filter.
     35So taking a similar approach as above, we could support the {{{search_columns}}} query argument and the {{{post_search_columns}}} or {{{search_columns}}} filter.
    2836
    29 I wonder now if one should support both, i.e. a ''search fields input argument'' and a ''search fields filter''?
    30