wpcf7_recaptcha_noscript

The Contact Form 7 wpcf7 recaptcha noscript function.

Description

wpcf7_recaptcha_noscript( (string) $args = '' ); 

Parameters (1)

0. $args — Optional. (string) => ''
The args.

Usage

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

Defined (1)

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

/modules/recaptcha.php  
  1. function wpcf7_recaptcha_noscript( $args = '' ) { 
  2. $args = wp_parse_args( $args, array( 
  3. 'sitekey' => '' ) ); 
  4.  
  5. if ( empty( $args['sitekey'] ) ) { 
  6. return; 
  7.  
  8. $url = add_query_arg( 'k', $args['sitekey'],  
  9. 'https://www.google.com/recaptcha/api/fallback' ); 
  10.  
  11. ob_start(); 
  12. ?> 
  13.  
  14. <noscript> 
  15. <div style="width: 302px; height: 422px;"> 
  16. <div style="width: 302px; height: 422px; position: relative;"> 
  17. <div style="width: 302px; height: 422px; position: absolute;"> 
  18. <iframe src="<?php echo esc_url( $url ); ?>" frameborder="0" scrolling="no" style="width: 302px; height:422px; border-style: none;"> 
  19. </iframe> 
  20. </div> 
  21. <div style="width: 300px; height: 60px; border-style: none; bottom: 12px; left: 25px; margin: 0px; padding: 0px; right: 25px; background: #f9f9f9; border: 1px solid #c1c1c1; border-radius: 3px;"> 
  22. <textarea id="g-recaptcha-response" name="g-recaptcha-response" class="g-recaptcha-response" style="width: 250px; height: 40px; border: 1px solid #c1c1c1; margin: 10px 25px; padding: 0px; resize: none;"> 
  23. </textarea> 
  24. </div> 
  25. </div> 
  26. </div> 
  27. </noscript> 
  28. <?php 
  29. return ob_get_clean();