By default, WordPress offers the possibility for administrators to modify the code of themes and plugins through the administration board. This feature is accessible from the side menu: Appearance -> Editor and plugins -> Editor.
Disable the theme and theme editor.plugins
It is possible to disable the "Editor" feature by adding the following line to the file wp-config.php located at the root of your site WordPress, before the line
/* That's all, stop editing! Happy blogging. */.
// Disable the Plugin and Theme Editor define( 'DISALLOW_FILE_EDIT', true );
Disable the editor, updates and adding themes andplugins
It is also possible to disable updates, adding and editing for themes and plugins by using the constant
DISALLOW_FILE_MODSfile, still in the wp-config.php.
// Disable Plugin and Theme Update and Installation define( 'DISALLOW_FILE_MODS', true );