Skip to content

Instantly share code, notes, and snippets.

@SiGaCode
Last active February 1, 2018 18:19
Show Gist options
  • Save SiGaCode/76a240c05150e73144f48bb49f12e881 to your computer and use it in GitHub Desktop.
Save SiGaCode/76a240c05150e73144f48bb49f12e881 to your computer and use it in GitHub Desktop.
Hides the GeneratePress options (and license) page for any user except admins. https://generatepress.com/forums/topic/limit-access-to-theme-options-menu/
add_action('after_setup_theme','generate_hide_generatepress');
function generate_hide_generatepress()
{
if (current_user_can('activate_plugins') == false) {
remove_action('admin_menu', 'generate_create_menu');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment