[wp-hackers] Editing Custom Post Type's Custom Taxonomy with a custom Role

Tom Barrett tcbarrett at gmail.com
Sat Sep 24 21:26:46 UTC 2011


On a local mailing list, someone asked about managing capabilities for a
custom post type with a custom taxonomy. I thought it would be nice to blog
an example of that, adding in a custom role. The aim is to allow a Person to
edit People and their Professions (and nothing else).

http://pastebin.com/90GwDgmj

I got a little confused, trying to fiddle with the capabilities, so
apologies if there is a glaring mistake that fixes my issue.

Currently my Person can read/edit/quickedit/publish/delete their own and
other's Peoples. The Person can add/delete/quickedit taxonomies, but cannot
*edit* them. That is the URI
/wp-admin/edit-tags.php?action=edit&taxonomy=profession&tag_ID=14&post_type=peoplefails
with the error 'Cheatin’ uh?' on Update.

WordPress 3.2.1
Theme: twentyten child theme (so I can play in functions.php).
Plugins: capsman, debug-bar, debug-bar-extender

-- 
http://gplus.to/tcbarrett


More information about the wp-hackers mailing list