Changeset 8364
- Timestamp:
- 07/17/2008 05:00:35 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.6/wp-includes/taxonomy.php
r8225 r8364 765 765 if ( 0 == $term ) 766 766 return 0; 767 $where = $wpdb->prepare( "t.term_id = %d", $term );767 $where = 't.term_id = %d'; 768 768 } else { 769 769 if ( '' === $term = sanitize_title($term) ) 770 770 return 0; 771 $where = $wpdb->prepare( "t.slug = %s", $term );771 $where = 't.slug = %s'; 772 772 } 773 773 774 774 if ( !empty($taxonomy) ) 775 return $wpdb->get_row( $wpdb->prepare("SELECT tt.term_id, tt.term_taxonomy_id FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy as tt ON tt.term_id = t.term_id WHERE $where AND tt.taxonomy = %s", $t axonomy), ARRAY_A);776 777 return $wpdb->get_var( "SELECT term_id FROM $wpdb->terms as t WHERE $where");775 return $wpdb->get_row( $wpdb->prepare("SELECT tt.term_id, tt.term_taxonomy_id FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy as tt ON tt.term_id = t.term_id WHERE $where AND tt.taxonomy = %s", $term, $taxonomy), ARRAY_A); 776 777 return $wpdb->get_var( $wpdb->prepare("SELECT term_id FROM $wpdb->terms as t WHERE $where", $term) ); 778 778 } 779 779
Note: See TracChangeset
for help on using the changeset viewer.