First off, thanks for the terrific plugin, it’s working smoothly for my hierarchical and non-hierarchical custom posts. My issue is with how capabilities are implemented…
Each custom post type has its own capability defined in register_post_type(). For instance, my “Design” CPT has a custom capability “design” which creates its own “edit_others_designs” capability. In my instance, I have dozens of CPTs which have different sets of caps, which then map back to several different roles on the particular blog. So, since WP is already managing the permission to edit these CPTs, it would make sense for your plugin to defer to these permissions. In my case, “edit_others_pages” is off-limits to the people who would need to reorder designs.
If support for this is too burdensome, then perhaps a simple filter of this value would allow me to at least hook in the proper cap at plugins_loaded, and override “edit_others_pages.” But, I would think that using the CPT capability would be fairly easy to implement without breaking anything else (by default, hierarchical CPTs would use “edit_others_pages”).
- The topic ‘Use custom post capabilities rather than edit_others_pages’ is closed to new replies.