Created
July 26, 2014 01:38
-
-
Save bappi-d-great/9afa829fed9591b8a615 to your computer and use it in GitHub Desktop.
Stop accessing themes.php for subsite admin in a multisite
This file contains hidden or 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
<?php | |
add_action('admin_init', 'disallowed_theme_page'); | |
function disallowed_theme_page() { | |
global $pagenow; | |
if($pagenow == 'themes.php' && !is_super_admin()){ | |
wp_redirect(admin_url()); | |
exit; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment