Changes in trunk/wp-includes/taxonomy.php [11971:12261]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/taxonomy.php
r11971 r12261 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 } … … 1516 1519 } 1517 1520 1518 do_action('set_object_terms', $object_id, $terms, $tt_ids, $taxonomy, $append );1521 do_action('set_object_terms', $object_id, $terms, $tt_ids, $taxonomy, $append, $old_tt_ids); 1519 1522 return $tt_ids; 1520 1523 } … … 1678 1681 return new WP_Error('duplicate_term_slug', sprintf(__('The slug “%s” is already in use by another term'), $slug)); 1679 1682 } 1680 do_action( 'edit_terms', $ alias->term_id );1683 do_action( 'edit_terms', $term_id ); 1681 1684 $wpdb->update($wpdb->terms, compact( 'name', 'slug', 'term_group' ), compact( 'term_id' ) ); 1682 1685 if ( empty($slug) ) { … … 1684 1687 $wpdb->update( $wpdb->terms, compact( 'slug' ), compact( 'term_id' ) ); 1685 1688 } 1686 do_action( 'edited_terms', $ alias->term_id );1689 do_action( 'edited_terms', $term_id ); 1687 1690 1688 1691 $tt_id = $wpdb->get_var( $wpdb->prepare( "SELECT tt.term_taxonomy_id FROM $wpdb->term_taxonomy AS tt INNER JOIN $wpdb->terms AS t ON tt.term_id = t.term_id WHERE tt.taxonomy = %s AND t.term_id = %d", $taxonomy, $term_id) ); … … 2214 2217 2215 2218 if ( empty($termlink) ) { 2216 $file = get_option('home') . '/';2219 $file = trailingslashit( get_option('home') ); 2217 2220 $t = get_taxonomy($taxonomy); 2218 2221 if ( $t->query_var )
Note: See TracChangeset
for help on using the changeset viewer.