Support » Plugin: WPBruiser {no- Captcha anti-Spam} » AMP compatibility

  • Hi! The plugin is doing a great job.

    But the code for regular pages is not compatible with AMP.

    Not sure whether the public code of the plugin is compatible with the AMP. Most likely, you can disable the effect of the plugin on the public code.

    The code below does not work

    // wpBruiser - Not Work:
    add_action(
        'wp',
        function () {
            if (function_exists('is_amp_endpoint') && is_amp_endpoint()) {
                global $GoodByeCaptchaPublic;
                remove_action('wp_print_scripts', array($GoodByeCaptchaPublic, 'renderPublicScript'), 0);
                remove_action('wp_print_footer_scripts', array($GoodByeCaptchaPublic, 'renderPublicScript'), 0);
            }
        }
    );

    And more to disable:
    GdbcWordPressPublicModule.php:

    private function activateCommentsHooks()
    	{
    
    		$this->addActionHook('comment_form_top', array($this, 'renderTokenFieldIntoCommentsForm'));
    		$this->addActionHook('comment_form'    , array($this, 'renderTokenFieldIntoCommentsForm'));
    // ...
    }

    any ideas?

    • This topic was modified 10 months, 2 weeks ago by vralle.
    • This topic was modified 10 months, 2 weeks ago by vralle.
    • This topic was modified 10 months, 2 weeks ago by vralle.

    The page I need help with: [log in to see the link]

  • The topic ‘AMP compatibility’ is closed to new replies.