Editor save theme Options (2 posts)

  1. Tammy Hart
    Posted 4 years ago #

    I've created a theme options page, that works great as an administrator, but when logged in as an editor, it messes up.

    I have the add_theme_page capability set to "edit_theme_options", but it didn't show the page to my editor user. So I manually added that capability to the editor role and then it only added the appearance top menu. Clicking that gave me a blank themes.php, but no options page. I can manually type in the address to the theme options page and it goes to it, but it gives me the "Cheatin' Uh" die message when i try to save the settings. I can only get it to save the settings if I add_cap('manage_options') to the editor role. This is not the solution I'm looking for, obviously.

    I know it's specific to my theme because I changed the theme to Twenty Eleven and the editor had access to everything and couls ave options, no problem.

  2. silverks
    Posted 4 years ago #

    You'll have to add a filter to allow users with 'edit_theme_options' capability to save theme options.

    See the fix in core:

    And its implementation in TwentyEleven:

Topic Closed

This topic has been closed to new replies.

About this Topic