Prevent JavaScript enqueue on frontend
-
Hi,
First of all, thanks for creating this super useful, well-designed plugin.
I’m in the process of implementing it at Goshen College (goshen.edu), a large, highly trafficked WordPress site, but am unable to do so b/c the plugin loads the recaptcha scripts on every page, even though we just need them on the login and password reset pages. Performance matters a lot to us, and we can’t afford to force 99% of our users to download scripts for the 1% who actually log in.
I’m planning on forking your plugin and commenting out line 18 of MchBasePublicPlugin.php:
add_action('wp_enqueue_scripts', array( $this, 'enqueuePublicScriptsAndStyles' ));
It would be great if there was an action/filter/constant for disabling the public enqueueing of scripts & styles. Even better, you could only enqueue them publicly if one of the non-Wordpress options (WooCommerce, UltraCommunity, etc..) is checked.
Thanks!
– Micah
- The topic ‘Prevent JavaScript enqueue on frontend’ is closed to new replies.