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:
parent
1664f9b0c2
commit
e09057ce2e
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue