Moderators: Refactor per-forum moderators to use meta-data instead of mocked taxonomy terms.
If the future of Forums is a taxonomy (vs. a custom post-type) then a per-forum Moderator taxonomy for a Forum taxonomy won't work very well, for a few reasons:
- Scalability
- Taxonomies for taxonomies is a bit more inception than should be required for this simple feature
- Forum moderators do not require much of what taxonomy objects provide (permalinks, visibility, metadata, etc...)
- User taxonomy terms matching nicenames works okay for something like Automattic's P2 theme, but bbPress requires a user ID based solution to avoid data synchronization issues between nicenames & term slugs
So... the future of per-forum per-user capability mappings is in meta-data using map_meta_cap
.
This commit:
- Removes the
forum_mod
taxonomy and surrounding code additions introduced in the first pass in r5834
- Renames
forum_mod
functions to forum_moderator
to be more explicit
- Adds CRUD wrapper functions for per-forum moderator meta data
- Adds administrative interfaces for assigning moderators to forums for
wp-admin
and forum edit
pages
- Adds helper functions for getting user nicenames & IDs
Note that this feature has now been refactored to no longer be forum specific (I.E. object agnostic) -- it's possible for any user access to be mapped based on the object type using any meta-data key. While this is currently useful for per-forum moderators, it may be user for per-topic blocking, per-topic-tag moderation, etc...
See #459.