Created
August 24, 2013 17:12
-
-
Save hlashbrooke/6329261 to your computer and use it in GitHub Desktop.
Make your WordPress content editor use HTML by default - this example will ensure that only non-admin users see the HTML editor by default.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'wp_default_editor', 'set_html_content_editor' ); | |
function set_html_content_editor( $tab ) { | |
if( ! current_user_can( 'administrator' ) ) { | |
$tab = 'html'; | |
} | |
return $tab; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment