Support » Plugins » Allow Editor role to save custom options

  • I’m trying to create a custom admin page, which is no problem, however, I’d like to allow the editor role to save the custom options, and I’m getting the “Cheatin’ uh?” error. I have made the custom admin page available to the editors as follows:

    function my_options_menu() {
      add_options_page('My Options', 'My Options', 'edit_others_posts', __FILE__, 'my_options_page');
    function my_options_page() { ?>
      <form method='post' action='options.php'>
      <?php settings_fields('my_options');
    <?php }

    I think the reason that Editors are not able to save the options is because they don’t have “manage_options” capabilities, but I don’t know how to work around that, because I don’t want to give them that capability.

    Can anyone help me through this?

Viewing 3 replies - 1 through 3 (of 3 total)
  • I’m having exactly the same problem with my own Plugin.

    Everything worked fine on 2.6, but since the nightmarish process of figuring out how to get it to work wit 2.7+ I’ve now got this to contend with.

    I can see a couple of other Plugins I’m using are working with level 5 roles for Editors, but it’s choking on mine and I don’t know why. As I said, everything worked fine on 2.6

    Count me 3 – I think it’s something happening after the submit action but if there’s a hidden field for authentication, I’ve yet to come across any blog/forum posts on it. Hopefully someone in the know eventually responds.

    Well for my purposes guys I just needed to be able to create a textarea where someone could update a brief message on the home page. To that end, I just used a dashboard widget and it worked for my editor level requirements.

    Is it possible that by it’s very definition of “admin_menu” that you can’t get around permissions on saving? Wish there was more clarification/better tutorials on this…

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Allow Editor role to save custom options’ is closed to new replies.