#1662
Vladimir
Keymaster

Hi,

This code removes all HTML tags from the post content before save it for all users with ‘author’ role:

add_filter('content_save_pre', 'nohtml_in_posts');

function nohtml_in_posts($content) {
if (current_user_can('author')) {
$content = wp_filter_nohtml_kses($content);
}

return $content;
}

Include it into active theme’s functions.php file.