Last active
September 10, 2022 17:43
-
-
Save broskees/c6528641316e90dda269f48db3f98e84 to your computer and use it in GitHub Desktop.
A WordPress mu-plugin to disable visual editing of the homepage and only allow text editing
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 | |
/** | |
* Don't break my homepage mu-plugin | |
* | |
*/ | |
add_filter('user_can_richedit', function ($can) { | |
global $post; | |
if ($post_ID === (int) get_option('page_on_front')) { | |
return false; | |
} | |
return $can; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment