like_escape() from nbachiyski. see #5684

git-svn-id: https://develop.svn.wordpress.org/trunk@6680 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2008-01-29 17:20:27 +00:00
parent 7707124027
commit 222e9ca396
2 changed files with 12 additions and 2 deletions

View File

@@ -268,8 +268,9 @@ function tag_rows( $page = 0, $pagesize = 20, $searchterms = '' ) {
$args = array('offset' => $start, 'number' => $pagesize, 'hide_empty' => 0);
if ( !empty( $searchterms ) )
$args['name__like'] = '%' . $searchterms;
if ( !empty( $searchterms ) ) {
$args['name__like'] = '%' . like_escape( $searchterms );
}
$tags = get_terms( 'post_tag', $args );