GP Hooks has been replaced by our Elements module. Learn more about the hook system in Elements here.

Disallow PHP Execution

DISALLOW_FILE_EDIT is defined. Your should also disallow PHP execution in GP Hooks.

If you see this message, it means you have the following line in your wp-config.php file:

define( 'DISALLOW_FILE_EDIT', true );

If you didn’t add this code, it’s likely you’re using a security plugin which has added it for you.

This is recommended by WordPress as an extra layer of security. By disabling file editing, you prevent bad people who gain access to your Dashboard (bad in itself) from executing PHP and gaining access to your server.

GP Hooks also has a constant you can define to disallow PHP execution from within the hooks:

define( 'GENERATE_HOOKS_DISALLOW_PHP', true );

If DISALLOW_FILE_EDIT is defined, then you should disable PHP execution in GP Hooks. Likewise, if you disable PHP execution in GP Hooks, you should define DISALLOW_FILE_EDIT as well.

Where to add it

This constant should be added into your wp-config.php file, below the DISALLOW_FILE_EDIT constant.

Removing the admin message

If for some reason you want to keep PHP execution in GP Hooks (and disallow file editing), you can remove the admin message added by GP Premium with this function:

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