Remove Visual Editor for Custom Role
Question
I want to remove visual editor from custom role, after I applied the code below, it hides the visual editor from all roles including admin. Need help thank you in advanced
//remove visual editor for custom role
function remove_visual_editor($tabs)
{
if (!current_user_can('wdm_instructor')) { // replace role ID with your own
return $tabs;
}
return $tabs;
}
add_filter('user_can_richedit', '__return_false', 'remove_visual_editor');
0
functions
3 years
2020-06-22T21:10:26-05:00
2020-06-22T21:10:26-05:00 0 Answers
86 views
0
Leave an answer