[Support request] DISALLOW_FILE_EDIT

Home Forums Support [Support request] DISALLOW_FILE_EDIT

Home Forums Support DISALLOW_FILE_EDIT

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #770916
    Jagoba

    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?

    #771274
    Leo
    Staff
    Customer Support

    Hi there,

    It is explained here: https://docs.generatepress.com/article/disallow-php-execution/

    Where are you seeing the message?

    #771302
    Jagoba

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

    #771491
    Leo
    Staff
    Customer Support

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

    Are you still using the old GP Hooks module?

    #771740
    Jagoba

    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

    #772122
    Leo
    Staff
    Customer Support

    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/

    #772286
    Jagoba

    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.

    #772300
    Tom
    Lead Developer
    Lead Developer

    The code Leo mentioned can be added using one of these methods: https://docs.generatepress.com/article/adding-php/

    Let me know if it removes it for you or not 🙂

    #772316
    Jagoba

    In the previous article: https://docs.generatepress.com/article/disallow-php-execution/
    I understood different thing …

    So that message, “DISALLOW_FILE_EDIT is defined. You should also disallow PHP execution in GP Hooks. Learn how” in the WP desktop is not critical? Can I leave it?

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