How it works...
The default WordPress features only allow administrators to edit files through plugin and theme editors. WordPress uses built-in capabilities to provide access to these features. There are three file-editing capabilities in WordPress called edit_files, edit_plugins, and edit_themes. WordPress checks for the DISALLOW_FILE_EDIT constant before loading these editors. If the constant is available and set up as TRUE, WordPress will assign a value called do_not_allow instead of the actual capability. Once this is set, users will not have the edit_plugins or edit_themes capabilities. If the constant is not set or set as FALSE, WordPress will return the capability value as edit_plugins or edit_themes, allowing the user to access the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access