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

git-svn-id: http://svn.automattic.com/wordpress/trunk@9629 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-11-12 05:02:58 +00:00
parent 1664f9b0c2
commit e09057ce2e
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;