gglcptch_add_async_attribute

The Google Captcha (reCAPTCHA) by BestWebSoft gglcptch add async attribute function.

Description

gglcptch_add_async_attribute( $tag, $handle ); 

Parameters (2)

0. $tag
The tag.
1. $handle
The handle.

Usage

  1. if ( !function_exists( 'gglcptch_add_async_attribute' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'google-captcha-recaptcha-by-bestwebsoft/google-captcha.php'; 
  3.  
  4. // The tag. 
  5. $tag = null; 
  6.  
  7. // The handle. 
  8. $handle = null; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = gglcptch_add_async_attribute($tag, $handle); 
  12.  

Defined (1)

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

/google-captcha.php  
  1. function gglcptch_add_async_attribute( $tag, $handle ) { 
  2. if ( 'gglcptch_api' == $handle ) 
  3. $tag = str_replace( ' src', ' data-cfasync="false" async="async" defer="defer" src', $tag ); 
  4. return $tag;