Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #376220

    After my earlier question “How to enable the Enfold “Theme Options” for editors?” the solution was to add the “manage_options” capability to the Editor role by means of the “Members” role editor plugin.

    However, this “manage_options” capability also enables the “Settings” menu, which should not be available to Editors. I tried setting other capabilities, but none of the capabilities I can select in the “Members” role editor plugin works as required.

    Other themes seem to work a bit more consistent. For instance, when I use the Nevada theme, adding the “edit_theme_options” capability to the Editor role enables access to the theme settings, without enabling the Settings menu. As discussed in my previous question, setting edit_theme_options does not work for Enfold.

    For now, I’m not looking for a solution based on CSS to simply not display the Settings menu, and I understand this is currently not how Enfold works, but still I’d like to find a good solution, such as a custom capability, to enable the Enfold Theme Settings without revealing the Settings menu.

    Can you help me to realize a solution?

    #376501

    Hey ocetechnologies!

    This is starting to border on custom work so it would be best to hire a freelancer to help you out with these editor customizations.

    The CSS you need is this.

    #menu-settings { display: none !important; }
    

    And you can try using this function, http://codex.wordpress.org/Function_Reference/current_user_can, to check if the user has certain capabilities.

    Regards,
    Elliott

    #376681

    Hi

    Okay, I can hire a freelancer, but before I do that I need to know if there is a “hidden” setting, or “hook” or capability in Enfold that enables the Theme Options menu. Is there? Or is it only controlled by the “manage_options” capability?

    Ideally, to enable the Enfold Theme Options menu for certain user roles should be controlled by the “edit_theme_options” capability (which seems to be designed exactly for this purpose) , and NOT by the “manage_options” capability. Should this be an improvement / enhancement request?

    Your advise please

    #377101

    Hi!

    It sounds like your looking for line 143 in /enfold/framework/php/class-adminpages.php.

    Best regards,
    Elliott

    #377287

    Ok, this seems to work, after changing “manage_options” into “edit_theme_options” in line 143 (and 155) in that file, and after adding the “edit_theme_options” capability to the editor role, the Enfold dashboard menu appears for Editors and can be used.

    Last question then: I assume this change is overwritten during a theme upgrade (or may be overwritten). How can I preserve this change? I’m already using a child theme.

    #377826

    Hey!

    You can copy the whole avia_adminpages class to your child functions.php.

    Regards,
    Josue

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.