Created
April 14, 2015 06:06
-
-
Save tareiking/39a278b456a5aec699a2 to your computer and use it in GitHub Desktop.
Remove WYSIWYG Editor for Custom Post Type
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 | |
/** | |
* Remove the text-editor from CPT | |
*/ | |
function disable_wysiwyg_for_CPT( $default ) { | |
global $post; | |
if ( 'CPT' == get_post_type( $post ) ) { | |
return false; | |
} | |
return $default; | |
} | |
add_filter( 'user_can_richedit', 'disable_wysiwyg_for_CPT' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment