Skip to content

Instantly share code, notes, and snippets.

@agrogeek
Created December 16, 2020 15:28
Show Gist options
  • Save agrogeek/20f6f161c4d87a0a58a94e939152a290 to your computer and use it in GitHub Desktop.
Save agrogeek/20f6f161c4d87a0a58a94e939152a290 to your computer and use it in GitHub Desktop.
WP HACK - dequeue script google-invisible-recaptcha plugin in front pages
add_action('wp_print_scripts', function (){
if( !in_array( $GLOBALS[ 'pagenow' ], array( 'wp-login.php', 'OTHER PAGES WITHOUT INVISIBLE RECAPTCHA' ), true ) ){
wp_dequeue_script( 'google-invisible-recaptcha' );
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment