[wp-hackers] can't edit custom taxonomy term

Steve Taylor steve at sltaylor.co.uk
Tue May 10 14:29:53 UTC 2011


Hi,

I have a custom taxonomy, and while I can add terms, I can't edit them
(I get "Cheatin' huh?"). I'm an administrator, with no role
customization.

Using a code inspector, I've edited the form action from
"edit-tags.php" to "edit-tags.php?taxonomy=eventtype", and it works.

It looks like the edit-tags.php form passes the taxonomy as a hidden
field and the form submits with the post method, but the permissions
check at the top of the edit-tags.php file, is based on $taxnow. AFAIK
this is set in admin.php around line 97, and is set from the $_GET
vars.

Am I missing something here?

FWIW, here's my taxonomy declaration:

register_taxonomy(
	'eventtype', 'sparks_event',
	array(
		'hierarchical'		=> true,
		'query_var'			=> true,
		'rewrite'			=> true
		'labels'			=> array(
			'name'			=> __( 'Event types' ),
			'singular_name'		=> __( 'Event type' ),
			'search_items'		=> __( 'Search Event types' ),
			'all_items'			=> __( 'All Event types' ),
			'edit_item'			=> __( 'Edit Event type' ),
			'update_item'		=> __( 'Update Event type' ),
			'add_new_item'		=> __( 'Add New Event type' ),
			'new_item_name'	=> __( 'New Event type Name' ),
		)
	)
);

cheers,

Steve Taylor


More information about the wp-hackers mailing list