gglcptch_remove_dublicate_scripts

The Google Captcha (reCAPTCHA) by BestWebSoft gglcptch remove dublicate scripts function.

Description

gglcptch_remove_dublicate_scripts(); 

Usage

  1. if ( !function_exists( 'gglcptch_remove_dublicate_scripts' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'google-captcha-recaptcha-by-bestwebsoft/google-captcha.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = gglcptch_remove_dublicate_scripts(); 
  7.  

Defined (1)

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

/google-captcha.php  
  1. function gglcptch_remove_dublicate_scripts() { 
  2. global $wp_scripts; 
  3.  
  4. if ( ! is_object( $wp_scripts ) || empty( $wp_scripts ) ) 
  5. return false; 
  6.  
  7. foreach ( $wp_scripts->registered as $script_name => $args ) { 
  8. if ( preg_match( "|google\.com/recaptcha/api\.js|", $args->src ) && 'gglcptch_api' != $script_name ) 
  9. /** remove a previously enqueued script */ 
  10. wp_dequeue_script( $script_name );