Black Friday sale! Get up to 25% off GP Premium! Learn more ➝

[Support request] define( 'GENERATE_HOOKS_DISALLOW_PHP', true );

Home Forums Support [Support request] define( 'GENERATE_HOOKS_DISALLOW_PHP', true );

Home Forums Support define( 'GENERATE_HOOKS_DISALLOW_PHP', true );

  • This topic has 2 replies, 3 voices, and was last updated 6 years ago by Leo.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #434982
    Visual D

    Hi Tom

    After adding “define( ‘GENERATE_HOOKS_DISALLOW_PHP’, true );” to wp-config i found that execute PHP under GP hooks stopped working.

    After i removed it from wp-config it start working again.

    Thanks

    Edwin

    #435033
    Roman

    Yes, that is exactly the behavior expected by defining define( ‘GENERATE_HOOKS_DISALLOW_PHP’, true ); in wp-config – the execution of php in hooks is prevented then. 🙂

    So what exactly was your concern? Why did you want to make this entry?

    Maybe this reading this entry will help you:
    Disallow PHP Execution

    However, if you just want to hide the red admin hint, then paste the following code into your child theme’s functions.php:

    add_action( 'after_setup_theme', 'tu_remove_hooks_php_check' );
    function tu_remove_hooks_php_check() {
        remove_action( 'admin_notices','generate_hooks_php_check' );
    }
    #435114
    Leo
    Staff
    Customer Support

    Thanks Roman 🙂

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.