[Resolved] Bug in Disable Elements functions.php

Home Forums Support Bug in Disable Elements functions.php

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #96463
    Russell Masters

    Whenever I edit the page with Beaver Builder and then save the changes, the elements I have checked to disable using the premium addon “Disable Elements” become unchecked and the elements reappear.

    I spoke with Justin at WPBeaverBuilder.com who replied with:

    The issue is that they are hooking into the save_post action and their function has a bug that makes it think it’s always running on the post edit screen. That’s because the true/false check is wrapped in quotes on line 213 of gp-premium/addons/generate-disable-elements/inc/functions.php

    $is_valid_nonce = ( isset( $_POST[ 'generate_de_nonce' ] ) && wp_verify_nonce( $_POST[ 'generate_de_nonce' ], basename( __FILE__ ) ) ) ? 'true' : 'false';

    If you remove the quotes then a real boolean value is returned…

    $is_valid_nonce = ( isset( $_POST[ 'generate_de_nonce' ] ) && wp_verify_nonce( $_POST[ 'generate_de_nonce' ], basename( __FILE__ ) ) ) ? true : false;

    I have tested this and can confirm that it works.

    #96611
    Tom
    Lead Developer
    Lead Developer

    Thanks for pointing this out! I’ve made the change in the core files 🙂

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