Disable theme editing from dashboard

PHP Code Snippet

To do this from the WordPress Admin, just go under Appearance > Editor. Then choose functions.php from the right-hand navigation. Just remember: if you only have access to the files using the WordPress Admin editor, then you will lose access yourself. If this is the case, consider using the following snippet: