members
members copied to clipboard
No easy way to add custom settings to post/page content permissions
I would like to be able to add my own settings to your settings page for an addon i'm building.
I was thinking either we can add some do_actions before/after the li tags or convert the settings to an array that can be filtered
https://github.com/justintadlock/members/blob/master/admin/class-meta-box-content-permissions.php#L182
(the same would need to be done for the content sections)
This is actually intentional for the time being for a number of reasons:
- Right now, the Gutenberg WP project could turn this into a disaster.
- Content Permissions (this meta box) is slated to be a part of a larger "Content Permissions" standalone plugin in the future.
- Most add-on plugins wouldn't need to hook into the Content Permissions meta box unless they're extending that specific feature.
I nearly added the ButterBean framework. However, Gutenberg has given me pause for the moment. Depending on the direction of Gutenberg, I may eventually build out the Content Permissions meta box with it.
If/When the direction of Gutenberg becomes clear, I'll reevaluate. And, if it looks like I'm ready for this to be extended, it'll definitely be in the form of integrating ButterBean.
Thanks for the fast reply, i totally get it... I'll move onto plan B for the moment :)
With Gutenberg now available, we need to make a hard decision about this ticket for 3.0.
I'd appreciate if there was some API to build plugins on top of members. "Content Permission" sounds like what's in my mind. I want to have the possibility to
- add a couple of pages programatically for a given role without having a user doing this
- override decision on "is page visible" for given role to be able to map pages to tags (or products)
- … (what else?)
Maybe extendability is the overall topic of this ticket.