[wp-trac] [WordPress Trac] #13992: get_terms() has 'search' and 'name__like'
WordPress Trac
noreply at wordpress.org
Sat Aug 24 02:26:20 UTC 2013
#13992: get_terms() has 'search' and 'name__like'
------------------------------+------------------
Reporter: dd32 | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 3.7
Component: Taxonomy | Version: 3.0
Severity: normal | Resolution:
Keywords: has-patch commit |
------------------------------+------------------
Description changed by SergeyBiryukov:
Old description:
> Both do similar things:
>
> {{{
> if ( !empty($name__like) )
> $where .= " AND t.name LIKE '{$name__like}%'";
> ...
>
> if ( !empty($search) ) {
> $search = like_escape($search);
> $where .= " AND (t.name LIKE '%$search%')";
> }
> }}}
>
> name__like should be removed in favour of search IMO, unless that
> functionality is intended, and in that case, name__like should get
> like_escape() applied
New description:
Both do similar things:
{{{
if ( !empty($name__like) )
$where .= " AND t.name LIKE '{$name__like}%'";
...
if ( !empty($search) ) {
$search = like_escape($search);
$where .= " AND (t.name LIKE '%$search%')";
}
}}}
`name__like` should be removed in favour of search IMO, unless that
functionality is intended, and in that case, `name__like` should get
`like_escape()` applied
--
--
Ticket URL: <http://core.trac.wordpress.org/ticket/13992#comment:11>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list