Created
June 20, 2013 02:46
-
-
Save nguyenvanduocit/5819961 to your computer and use it in GitHub Desktop.
Disable WYSIWYG Editor For Custom Post Types
If you need to make sure that your custom post type doesn’t have the ‘visual’ tab, you can easily diable it.
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
add_filter( 'user_can_richedit', 'disable_for_cpt' ); | |
function disable_for_cpt( $default ) { | |
global $post; | |
if ( 'movie' == get_post_type( $post ) ) | |
return false; | |
return $default; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment