Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@zeropointdevelopment
Created December 27, 2013 05:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zeropointdevelopment/8143123 to your computer and use it in GitHub Desktop.
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/
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