WordPress.org

Make WordPress Core

Changeset 9629


Ignore:
Timestamp:
11/12/08 05:02:58 (5 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-ajax.php

    r9541 r9629  
    5252    $s = trim( $s ); 
    5353    if ( strlen( $s ) < 2 ) 
    54      die; // require 2 chars for matching 
    55     $results = $wpdb->get_col( "SELECT name FROM $wpdb->terms WHERE name LIKE ('%". $s . "%')" ); 
     54        die; // require 2 chars for matching 
     55    $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 . "%')" ); 
    5656    echo join( $results, "\n" ); 
    5757    die; 
Note: See TracChangeset for help on using the changeset viewer.