Disable Changing The WordPress Theme

/**
* Disable changing the theme for anyone a part from the admin user
* Only can be changes
*/
add_action('admin_init', 'disable_changing_theme_for_non_admin');

function disable_changing_theme_for_non_admin() {
	global $submenu, $userdata;
	get_currentuserinfo();
	if ($userdata->ID != 1) {
		unset($submenu['themes.php'][5]);
	}
}

Leave a Reply