Skip to content

Instantly share code, notes, and snippets.

@Pebblo
Created January 22, 2021 12:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Pebblo/d724ba427c491b696d681fd3d76dd67e to your computer and use it in GitHub Desktop.
Save Pebblo/d724ba427c491b696d681fd3d76dd67e to your computer and use it in GitHub Desktop.
Adds reCaptcha scripts to Graphene theme as it doesn't 'fire' loop_end, so needs it's own hook.
<?php
add_action('wp_head', 'tw_add_invisible_recaptcha_to_graphene_loop');
function tw_add_invisible_recaptcha_to_graphene_loop() {
if( class_exists('EE_Registry') && EE_Registry::instance()->REQ->is_espresso_page() ) {
add_action('graphene_loop_footer', array('EED_Recaptcha_Invisible', 'localizeScriptVars'));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment