Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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