Changeset 24829
- Timestamp:
- 07/28/2013 10:15:03 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/taxonomy.php
r24714 r24829 2078 2078 // The alias isn't in a group, so let's create a new one and firstly add the alias term to it. 2079 2079 $term_group = $wpdb->get_var("SELECT MAX(term_group) FROM $wpdb->terms") + 1; 2080 do_action( 'edit_terms', $alias->term_id );2080 do_action( 'edit_terms', $alias->term_id, $taxonomy ); 2081 2081 $wpdb->update($wpdb->terms, compact('term_group'), array('term_id' => $alias->term_id) ); 2082 do_action( 'edited_terms', $alias->term_id );2082 do_action( 'edited_terms', $alias->term_id, $taxonomy ); 2083 2083 } 2084 2084 } … … 2119 2119 if ( empty($slug) ) { 2120 2120 $slug = sanitize_title($slug, $term_id); 2121 do_action( 'edit_terms', $term_id );2121 do_action( 'edit_terms', $term_id, $taxonomy ); 2122 2122 $wpdb->update( $wpdb->terms, compact( 'slug' ), compact( 'term_id' ) ); 2123 do_action( 'edited_terms', $term_id );2123 do_action( 'edited_terms', $term_id, $taxonomy ); 2124 2124 } 2125 2125 … … 2477 2477 // The alias isn't in a group, so let's create a new one and firstly add the alias term to it. 2478 2478 $term_group = $wpdb->get_var("SELECT MAX(term_group) FROM $wpdb->terms") + 1; 2479 do_action( 'edit_terms', $alias->term_id );2479 do_action( 'edit_terms', $alias->term_id, $taxonomy ); 2480 2480 $wpdb->update( $wpdb->terms, compact('term_group'), array( 'term_id' => $alias->term_id ) ); 2481 do_action( 'edited_terms', $alias->term_id );2481 do_action( 'edited_terms', $alias->term_id, $taxonomy ); 2482 2482 } 2483 2483 } … … 2496 2496 return new WP_Error('duplicate_term_slug', sprintf(__('The slug “%s” is already in use by another term'), $slug)); 2497 2497 } 2498 do_action( 'edit_terms', $term_id );2498 do_action( 'edit_terms', $term_id, $taxonomy ); 2499 2499 $wpdb->update($wpdb->terms, compact( 'name', 'slug', 'term_group' ), compact( 'term_id' ) ); 2500 2500 if ( empty($slug) ) { … … 2502 2502 $wpdb->update( $wpdb->terms, compact( 'slug' ), compact( 'term_id' ) ); 2503 2503 } 2504 do_action( 'edited_terms', $term_id );2504 do_action( 'edited_terms', $term_id, $taxonomy ); 2505 2505 2506 2506 $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) );
Note: See TracChangeset
for help on using the changeset viewer.