[wp-trac] [WordPress Trac] #51811: Query inconsistency between WP_Query and WP_Term_Query

WordPress Trac noreply at wordpress.org
Wed Nov 18 01:25:43 UTC 2020


#51811: Query inconsistency between WP_Query and WP_Term_Query
------------------------------+-----------------------------
 Reporter:  tonydjukic        |      Owner:  (none)
     Type:  enhancement       |     Status:  new
 Priority:  normal            |  Milestone:  Awaiting Review
Component:  Query             |    Version:  5.5.3
 Severity:  normal            |   Keywords:  dev-feedback
  Focuses:  coding-standards  |
------------------------------+-----------------------------
 For the sake of standardization and simplicity would it be beneficial to
 use 's' for searches in WP_Term_Query rather than using 'search'?


 {{{
 $wpquery = new WP_Query( array( 's'=>'search term' ) );
 }}}

 {{{
 $wptermquery = new WP_Term_Query( array( 'search'=>'search term' ) );
 }}}


 Not entirely sure why there's a differentiation between how a search term
 is used in the query args.  For the sake of standardization and a
 reduction in confused developers (like I was about 30 minutes ago) I think
 this is worth some consideration.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/51811>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list