Archived topic
DISALLOW_FILE_EDIT is defined.
8 replies · Started by Grant on June 23, 2017
DISALLOW_FILE_EDIT is defined. You should also disallow PHP execution in GP Hooks. Learn how.
I have all of a sudden started seeing this error. I would prefer to keep using GP Hooks. Is there a way of resolving this issue?
This should help: https://docs.generatepress.com/article/disallow-php-execution/
Hello, in my wordpress panel the following message appears:
DISALLOW_FILE_EDIT is defined. You should also disallow PHP execution in GP Hooks.
But I have not activated the PHP execution in GP Hooks.
What should I do?
Thank you very much
It's just a warning message, have you looked at the article above? https://docs.generatepress.com/article/disallow-php-execution/
Yes Leo, but i don´t know where i must add the function add_action. Could you help me?
One of these methods here: https://docs.generatepress.com/article/adding-php/
Code snippets is the way to go if you aren't using a child theme.
I have code snippets. Here is the code recommended in your "learn how":
define( 'GENERATE_HOOKS_DISALLOW_PHP', true );
Do I just snippets/add new - and then paste it into the box called Code?
Yup that's correct :)
Make sure to activate the snippet.
Well, Leo, It didn't get rid of the message. I ticked the "Run snippet everywhere" radial - should I run only in admin area?
Also, why does this message only show up on the English version of the site?