Skip to content

Instantly share code, notes, and snippets.

@ekka21
Created June 26, 2012 01:10
Show Gist options
  • Save ekka21/2992439 to your computer and use it in GitHub Desktop.
Save ekka21/2992439 to your computer and use it in GitHub Desktop.
Wordpress: Disable theme switching
add_action('admin_init', 'slt_lock_theme');
function slt_lock_theme() {
global $submenu, $userdata;
get_currentuserinfo();
if ($userdata->ID != 1) {
unset($submenu['themes.php'][5]);
unset($submenu['themes.php'][15]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment