Changeset 5937 for trunk/wp-includes/taxonomy.php
- Timestamp:
- 08/24/2007 02:44:26 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/taxonomy.php
r5906 r5937 283 283 * might be inaccurate or wrong. 284 284 */ 285 function get_term_by($field, $value, $taxonomy, $output = OBJECT ) {285 function get_term_by($field, $value, $taxonomy, $output = OBJECT, $filter = 'raw') { 286 286 global $wpdb; 287 287 … … 307 307 308 308 wp_cache_add($term->term_id, $term, $taxonomy); 309 310 $term = sanitize_term($term, $taxonomy, $filter); 309 311 310 312 if ( $output == OBJECT ) { … … 488 490 else if ( 'ids' == $fields ) 489 491 $select_this = 't.term_id'; 492 else if ( 'names' == $fields ) 493 $select_this == 't.name'; 490 494 491 495 $query = "SELECT $select_this FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy AS tt ON t.term_id = tt.term_id WHERE tt.taxonomy IN ($in_taxonomies) $where ORDER BY $orderby $order $number"; … … 772 776 if ( empty($slug) ) 773 777 $slug = sanitize_title($name); 774 else775 $slug = sanitize_title($slug);776 778 777 779 $term_group = 0;
Note: See TracChangeset
for help on using the changeset viewer.