WordPress.org

Make WordPress Core

Ticket #13992: 13992.diff

File 13992.diff, 675 bytes (added by wojtek.szkutnik, 4 years ago)
  • taxonomy.php

     
    953953                $where .= " AND t.slug = '$slug'"; 
    954954        } 
    955955 
    956         if ( !empty($name__like) ) 
     956        if ( !empty($name__like) ) { 
     957                $name__like = like_escape($name__like); 
    957958                $where .= " AND t.name LIKE '{$name__like}%'"; 
     959        } 
    958960 
    959961        if ( '' !== $parent ) { 
    960962                $parent = (int) $parent; 
     
    976978 
    977979        if ( !empty($search) ) { 
    978980                $search = like_escape($search); 
    979                 $where .= " AND (t.name LIKE '%$search%')"; 
     981                $where .= " AND ((t.name LIKE '%$search%') OR (t.slug LIKE '%$search%'))"; 
    980982        } 
    981983 
    982984        $selects = array();