Site logo

Archived topic

DISALLOW_FILE_EDIT

8 replies · Started by Jagoba on January 2, 2019

Viewing posts 1–9 of 9

Hi there,
I don't know why but I have suddenly a plugin message like "DISALLOW_FILE_EDIT is defined. You should also disallow PHP execution in GP Hooks. Learn how". Why?
How can I solve it?

On the wordpress manager, in the desk.
But why has it suddenly appeared? without any previous action?

It shouldn't. Nothing in GP premium has changed in regards to that.

Are you still using the old GP Hooks module?

I don't think so.
I don't understand which are the excat steps in https://docs.generatepress.com/article/disallow-php-execution/ to solve that

Just put this in wp_config?
add_action( 'after_setup_theme', 'tu_remove_hooks_php_check' );
function tu_remove_hooks_php_check() {
remove_action( 'admin_notices','generate_hooks_php_check' );
}

We don't have "define( 'DISALLOW_FILE_EDIT', true );" line in wp-config.php

It's just a warning message. If you want to remove it, then add this PHP snippet:

add_action( 'after_setup_theme', 'tu_remove_hooks_php_check' );
function tu_remove_hooks_php_check() {
    remove_action( 'admin_notices','generate_hooks_php_check' );
}

Adding PHP: https://docs.generatepress.com/article/adding-php/

Where?
According to the link of the article that you have sent me, it is into the wp-config.php after this line:“define( ‘DISALLOW_FILE_EDIT’, true );”
And that line does not appear in my config.

This archived topic is closed to new replies.