Last active
February 1, 2018 18:19
-
-
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/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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