members icon indicating copy to clipboard operation
members copied to clipboard

No easy way to add custom settings to post/page content permissions

Open Stiofan opened this issue 7 years ago • 4 comments

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) mysettings

Stiofan avatar Aug 01 '17 17:08 Stiofan

This is actually intentional for the time being for a number of reasons:

  1. Right now, the Gutenberg WP project could turn this into a disaster.
  2. Content Permissions (this meta box) is slated to be a part of a larger "Content Permissions" standalone plugin in the future.
  3. 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.

justintadlock avatar Aug 01 '17 17:08 justintadlock

Thanks for the fast reply, i totally get it... I'll move onto plan B for the moment :)

Stiofan avatar Aug 01 '17 17:08 Stiofan

With Gutenberg now available, we need to make a hard decision about this ticket for 3.0.

justintadlock avatar Jan 16 '19 20:01 justintadlock

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.

mgerzabek avatar Feb 27 '19 06:02 mgerzabek