--- taxonomy.php.ori	2009-08-12 22:31:53.515625000 +0200
+++ taxonomy.php	2009-10-12 18:40:42.734375000 +0200
@@ -1331,6 +1331,7 @@
  * @since 2.3.0
  * @uses $wpdb
  *
+ * @uses apply_filters() Calls 'pre_wp_insert_term' hook with term and taxonomy as parameters.
  * @uses do_action() Calls 'create_term' hook with the term id and taxonomy id as parameters.
  * @uses do_action() Calls 'create_$taxonomy' hook with term id and taxonomy id as parameters.
  * @uses apply_filters() Calls 'term_id_filter' hook with term id and taxonomy id as parameters.
@@ -1348,6 +1349,10 @@
 	if ( ! is_taxonomy($taxonomy) )
 		return new WP_Error('invalid_taxonomy', __('Invalid taxonomy'));
 
+	$term = apply_filters( 'pre_wp_insert_term', $term, $taxonomy );
+	if ( is_wp_error( $term ) )
+		return $term;
+
 	if ( is_int($term) && 0 == $term )
 		return new WP_Error('invalid_term_id', __('Invalid term ID'));
 
