wordpress - Disable visual editor based on role? -


i want disable visual editor form 'author' role form wordpress site. author see text editor when write post.

you can use user_can_richedit filter tell wp disable rich editor author through code (put inside functions.php file):

$user = wp_get_current_user(); if ( in_array( 'author', (array) $user->roles ) ) {     add_filter( 'user_can_richedit' , '__return_false', 50 ); } 

Comments

Popular posts from this blog

php - Hide output during test execution -

javascript - Migrate custom AngularJS filter from 1.2.28 to 1.4.x -

Update Magento products with multiple images -