[wp-trac] [WordPress Trac] #47339: Tags S and Š

WordPress Trac noreply at wordpress.org
Wed Oct 28 09:34:37 UTC 2020


#47339: Tags S and Š
-----------------------------------------+------------------------------
 Reporter:  Colics                       |       Owner:  (none)
     Type:  defect (bug)                 |      Status:  new
 Priority:  normal                       |   Milestone:  Awaiting Review
Component:  Taxonomy                     |     Version:  5.2
 Severity:  normal                       |  Resolution:
 Keywords:  needs-patch has-screenshots  |     Focuses:  administration
-----------------------------------------+------------------------------

Comment (by Colics):

 Solution
 in file wp-includes/taxonomy.php
 function term_exists( $term, $taxonomy = , $parent = null ) {
 ...
 change line
 $orderby = 'ORDER BY t.term_id ASC';
 with line
 $orderby = 'ORDER BY CASE WHEN hex(t.name) = hex(%s) THEN 0 ELSE 1 END,
 t.term_id ASC';

 How does this work?
 If he finds 100% equal, return it to the first one, if not then still
 according to the second criterion, ie. t.term_id ASC

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


More information about the wp-trac mailing list