Changeset 6246
- Timestamp:
- 10/13/2007 07:04:39 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/taxonomy.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/taxonomy.php
r6243 r6246 643 643 } 644 644 645 $term_id = $wpdb->get_var("SELECT term_id FROM $wpdb->terms as t WHERE $where"); 646 647 if ( empty($taxonomy) || empty($term_id) ) 648 return $term_id; 649 650 $taxonomy = $wpdb->escape( $taxonomy ); 651 return $wpdb->get_row("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 = '$taxonomy'", ARRAY_A); 645 if ( !empty($taxonomy) ) 646 return $wpdb->get_row("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 = '$taxonomy'", ARRAY_A); 647 648 return $wpdb->get_var("SELECT term_id FROM $wpdb->terms as t WHERE $where"); 652 649 } 653 650
Note: See TracChangeset
for help on using the changeset viewer.