Last active
February 28, 2022 22:04
-
-
Save jaredatch/cf357bde3376ef400842 to your computer and use it in GitHub Desktop.
Disable TinyMCE for specific page
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 | |
/** | |
* Disable visual TinyMCE editor for specifc page/post | |
* | |
* @since 1.0.0 | |
*/ | |
function ja_disable_fancy_editor( $can ) { | |
global $post; | |
if ( 3441 == $post->ID ) { | |
return false; | |
} | |
return $can; | |
} | |
add_filter( 'user_can_richedit', 'ja_disable_fancy_editor' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment