WordPress.org

Ready to get started?Download WordPress

Forums

Simple Page Ordering
[resolved] Use custom post capabilities rather than edit_others_pages (4 posts)

  1. boxcarpress
    Member
    Posted 1 year ago #

    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").

    http://wordpress.org/extend/plugins/simple-page-ordering/

  2. Jake Goldman
    10up Engineer
    Plugin Author

    Posted 1 year ago #

    This is a great point. I'll add this to the roadmap!

  3. Jake Goldman
    10up Engineer
    Plugin Author

    Posted 1 year ago #

    Fixed in 2.1.

  4. boxcarpress
    Member
    Posted 1 year ago #

    Great news! Thanks for the update.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic