Created
November 11, 2020 05:30
-
-
Save rustam-swe/8d15abc723ad03063ae1d13e038adeed to your computer and use it in GitHub Desktop.
Snippet for disabe editing files in WordPress
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 Theme Editor | |
* Source: http://guides.beanstalkapp.com/deployments/deploying-wordpress.html | |
*/ | |
function remove_editor_menu() { | |
remove_action('admin_menu', '_add_themes_utility_last', 101); | |
} | |
add_action('_admin_menu', 'remove_editor_menu', 1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment