1

I am running into exactly the problem described by this Trac: https://core.trac.wordpress.org/ticket/14365

I see that one of the devs added a Diff here: https://core.trac.wordpress.org/attachment/ticket/14365/14365.api.diff, which looks like it would add the ability to register the exact capability the user should have, to save the options -- without needing the user to have broad "manage_options" capability which I do not want them to have since it exposes too many other things in Admin.

OK, so that Diff looks good to me. But it looks like it was never implemented, and this Trac request was never really resolved.

Am I reading all of that correctly? There is no fix for this issue?

Seems I'd need to resort to something very ugly, like temporarily adding then removing "manage_options" capability (?)

  • In general I think that if you need to give a non admin the ability to save options then you are doing something wrong. Content people should not have the ability to change the way the site work. The only justification I can see is two tiers of admins, but I never heard of that in real life.. – Mark Kaplun Nov 10 '15 at 19:15
  • These options have nothing to do with the way the site works. I'm building a website generator. This options page contains text items like "business phone number", "business address", "business name", etc. They fill out the options, select one of my themes and boom - they have a website. I have everything in Admin locked down except this one options page they work with, and a custom post type for rich text/media they may also provide for their site. – C C Nov 10 '15 at 19:57
  • Sorry, I guess my time machine wasn't working correctly when I asked the question originally, in 2015... – C C Apr 23 at 20:36
0

Alright...I found the answer. They implemented it as a filter (which for the life of me I could not figure out via that Trac).

See here: Proper use of option_page_capability_{$page_name}

Once I added the capability filter in my plugin options class - works like a charm.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.