Changeset 12200
- Timestamp:
- 11/17/2009 08:51:32 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/taxonomy.php
r11971 r12200 302 302 function &get_term($term, $taxonomy, $output = OBJECT, $filter = 'raw') { 303 303 global $wpdb; 304 $null = null; 304 305 305 306 if ( empty($term) ) { … … 322 323 if ( ! $_term = wp_cache_get($term, $taxonomy) ) { 323 324 $_term = $wpdb->get_row( $wpdb->prepare( "SELECT t.*, tt.* FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy AS tt ON t.term_id = tt.term_id WHERE tt.taxonomy = %s AND t.term_id = %s LIMIT 1", $taxonomy, $term) ); 325 if ( ! $_term ) 326 return $null; 324 327 wp_cache_add($term, $_term, $taxonomy); 325 328 }
Note: See TracChangeset
for help on using the changeset viewer.