Last active
November 2, 2015 08:30
-
-
Save Archie22is/653c1fc1dba4ad4ad3cd to your computer and use it in GitHub Desktop.
Hide Pods Admin Menu from non-adminitrators
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
<?php | |
// add the following script to your theme functions.php | |
// Archie22is ---> https://github.com/Archie22is | |
add_action('admin_menu', 'remove_pods_menu', 11); | |
function remove_pods_menu () { | |
get_currentuserinfo() ; | |
global $user_level; | |
if ($user_level < 10){ | |
define('PODS_DISABLE_ADMIN_MENU', true); | |
define('PODS_DISABLE_CONTENT_MENU', true); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment