Skip to content

Instantly share code, notes, and snippets.

@woogist
Created May 29, 2015 13:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save woogist/50ed2cac801fd91c011c to your computer and use it in GitHub Desktop.
Save woogist/50ed2cac801fd91c011c to your computer and use it in GitHub Desktop.
Hide the Sensei add learner box for non admins
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