Created
December 27, 2013 05:57
-
-
Save zeropointdevelopment/8143123 to your computer and use it in GitHub Desktop.
[WordPress] Code from our blog post How to Disable Theme Switching - http://www.limecanvas.com/how-to-disable-theme-switching/
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('admin_init', 'lc_disable_theme'); | |
function lc_disable_theme() { | |
global $menuitem, $userdata; | |
get_currentuserinfo(); | |
if ($userdata->ID != 1) { | |
unset($menuitem['themes.php'][5]); | |
unset($menuitem['themes.php'][15]); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment