[wp-trac] [WordPress Trac] #53450: [WP_Meta_Query] Add faster LIKE based 'STARTSWITH' and 'ENDSWITH' compare modes for value query

WordPress Trac noreply at wordpress.org
Wed Sep 1 22:23:42 UTC 2021


#53450: [WP_Meta_Query] Add faster LIKE based 'STARTSWITH' and 'ENDSWITH' compare
modes for value query
-------------------------------------------------+-------------------------
 Reporter:  janthiel                             |       Owner:  (none)
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
                                                 |  Review
Component:  Query                                |     Version:  5.7.2
 Severity:  trivial                              |  Resolution:
 Keywords:  dev-feedback has-patch needs-docs    |     Focuses:
  needs-codex has-unit-tests                     |  performance
-------------------------------------------------+-------------------------
Changes (by manzwebdesigns):

 * severity:  normal => trivial


Comment:

 The only suggestion I would make is to make the following changes, moving
 'contains' to the beginning of the list of accepted options:
 {{{
 @type string $compare_key_like_mode  Search mode for LIKE compares.
 Accepts 'contains', 'startswith ' or
                                      'endswith'. Default is 'contains'.
 @type string $compare_like_mode      Search mode for LIKE compares.
 Accepts 'contains', 'startswith ' or
                                      'endswith'. Default is 'contains'.
 }}}

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


More information about the wp-trac mailing list