wpcf7_recaptcha_enqueue_scripts

The Contact Form 7 wpcf7 recaptcha enqueue scripts function.

Description

wpcf7_recaptcha_enqueue_scripts(); 

Usage

  1. if ( !function_exists( 'wpcf7_recaptcha_enqueue_scripts' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'contact-form-7/modules/recaptcha.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = wpcf7_recaptcha_enqueue_scripts(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/modules/recaptcha.php  
  1. function wpcf7_recaptcha_enqueue_scripts() { 
  2. $url = 'https://www.google.com/recaptcha/api.js'; 
  3. $url = add_query_arg( array( 
  4. 'onload' => 'recaptchaCallback',  
  5. 'render' => 'explicit' ), $url ); 
  6.  
  7. wp_register_script( 'google-recaptcha', $url, array(), '2.0', true );