By default, WordPress allows users to edit theme and plugin codes through the admin panel. While it is a useful feature, it can also be very dangerous. A simple typographical error may end up blocking you off your site unless you have the FTP access. To prevent customers from screwing up the site, it is best to disable the editors of themes and plugin in the WordPress admin panel. In this article, i will share with you a one line code that will disable the functionality of WordPress theme and plugin editors.
All you have to do is open your wp-config.php file and paste the following code:
define( 'DISALLOW_FILE_EDIT', true );
And you are done.
Note: if you paste this code into the functions.php file of the theme, it also works.