Created
May 29, 2015 13:17
-
-
Save woogist/50ed2cac801fd91c011c to your computer and use it in GitHub Desktop.
Hide the Sensei add learner box for non admins
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
add_action( 'sensei_learners_extra', 'custom_sense_disable_teacher_learner_add', 1 ); | |
function custom_sense_disable_teacher_learner_add ( ){ | |
// remove the learner add box for teachers | |
if( ! current_user_can( 'manage_options' ) ){ | |
remove_all_actions( 'sensei_learners_extra' ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment