[wp-hackers] duplicate slug ? for two differents taxonomies

Malaiac malaiac at gmail.com
Thu May 14 12:24:02 GMT 2009


http://svn.automattic.com/wordpress/trunk/wp-includes/taxonomy.php
function wp_update_term
around lines 1601
	// Check for duplicate slug
	$id = $wpdb->get_var( $wpdb->prepare( "SELECT term_id FROM
$wpdb->terms WHERE slug = %s", $slug ) );

Is there a logic to it ?
I understand  two terms of the same taxonomy must not share the same slug
but what I have a tag 'foo' and a category 'foo' ... shouldn't they be
able to share the same slug ?

NB : It works when you create the tag foo then the category foo
But if you create tag 'foo' and category 'bar' , you cannot set the
category back to 'foo' (terms id will be different)

Malaiac


More information about the wp-hackers mailing list