How to Disable Tinymce HTML editor for everyone but admin

Adding this snippet to the functions.php of your wordpress theme will disable the Tinymce HTML editor for everyone but the admin.
( click code to copy )wordpress snippet : PHP
<>
add_filter( 'wp_default_editor', create_function('', 'return "tinymce";') ); add_action( 'admin_head', 'disable_html_editor_wps' ); function disable_html_editor_wps() { global $current_user; get_currentuserinfo(); if ($current_user->user_level != 10) { echo '<style type="text/css">#editor-toolbar #edButtonHTML, #quicktags {display: none;}</style>'; } }
( WordPress codex functions, hooks, in this snippet. )
admin_head, get_currentuserinfo, add_filter, add_action, _e, wp,
Pingback: WordPress Conditional Tags (And Snippets) for Beginners()