[wp-hackers] Custom taxonomies for authors
Thomas Scholz
info at toscho.de
Sat Mar 13 13:43:28 UTC 2010
Dion Hulse:
> Personally i don't think creating it as a post taxonomy is what is
> needed here.
Yeah, most of the users don’t have any posts. Some of them don’t even have
an email address. Or a computer … :)
> You can visit /wp-admin/edit-tags.php?taxonomy=color directly and you'll
> be able to manage the Colours there.
Oh, thanks! Nice to know.
> You'll need to manually add a dropdown selection to the user edit page
> however based off that taxonomy data, you'd probably have to hook into
> 'show_user_profile' & 'edit_user_profile' to add a new Table and table
> row, as well as saving that data manually through the action which fires
> when user data is updated...
I was hoping to find a way without new tables (and 200 lines of extra
code).
Another idea was to misuse the roles and capabilities. The number of
colors is restricted,¹ so I could preset the list. This would be
semantically wrong – but probably faster. I’ll have to contemplate about
it.
Regards
Thomas
¹ <http://fifeweb.org/wp/breeds/breeds_ems.php>
--
http://toscho.de
More information about the wp-hackers
mailing list