Limit tag suggest to tags. Props DD32. fixes #8164

git-svn-id: https://develop.svn.wordpress.org/trunk@9629 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-11-12 05:02:58 +00:00
parent 66b4d45e4e
commit d884ee49f8
1 changed files with 2 additions and 2 deletions

View File

@ -51,8 +51,8 @@ case 'ajax-tag-search' :
}
$s = trim( $s );
if ( strlen( $s ) < 2 )
die; // require 2 chars for matching
$results = $wpdb->get_col( "SELECT name FROM $wpdb->terms WHERE name LIKE ('%". $s . "%')" );
die; // require 2 chars for matching
$results = $wpdb->get_col( "SELECT t.name FROM $wpdb->term_taxonomy AS tt INNER JOIN $wpdb->terms AS t ON tt.term_id = t.term_id WHERE tt.taxonomy = 'post_tag' AND t.name LIKE ('%". $s . "%')" );
echo join( $results, "\n" );
die;
break;