gglplsn_js

The Google +1 by BestWebSoft gglplsn js function.

Description

gglplsn_js(); 

Usage

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

Defined (1)

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

/google-plus-one.php  
  1. function gglplsn_js() { 
  2. global $gglplsn_is_button_shown; 
  3. if ( ! empty( $gglplsn_is_button_shown ) || defined( 'BWS_ENQUEUE_ALL_SCRIPTS' ) ) { 
  4. global $gglplsn_options, $gglplsn_lang_codes; 
  5. if ( 
  6. 1 == $gglplsn_options['plus_one_js'] || 
  7. 1 == $gglplsn_options['share_js'] || 
  8. 1 == $gglplsn_options['follow_js'] || 
  9. 1 == $gglplsn_options['hangout_js'] || 
  10. 1 == $gglplsn_options['badge_js'] 
  11. ) { 
  12. if ( 1 == $gglplsn_options['use_multilanguage_locale'] && isset( $_SESSION['language'] ) ) { 
  13. if ( array_key_exists( $_SESSION['language'], $gglplsn_lang_codes ) ) { 
  14. $gglplsn_locale = $_SESSION['language']; 
  15. } else { 
  16. $gglplsn_locale_from_multilanguage = str_replace( '_', '-', $_SESSION['language'] ); 
  17. if ( array_key_exists( $gglplsn_locale_from_multilanguage, $gglplsn_lang_codes ) ) { 
  18. $gglplsn_locale = $gglplsn_locale_from_multilanguage; 
  19. } else { 
  20. $gglplsn_locale_from_multilanguage = explode( '_', $_SESSION['language'] ); 
  21. if( is_array( $gglplsn_locale_from_multilanguage ) && array_key_exists( $gglplsn_locale_from_multilanguage[0], $gglplsn_lang_codes ) ) 
  22. $gglplsn_locale = $gglplsn_locale_from_multilanguage[0]; 
  23. if ( empty( $gglplsn_locale ) ) 
  24. $gglplsn_locale = $gglplsn_options['lang']; ?> 
  25. <script type="text/javascript"> 
  26. window.___gcfg = { 
  27. lang: '<?php echo $gglplsn_locale; ?>',  
  28. }; 
  29. </script> 
  30. <script type="text/javascript" src="https://apis.google.com/js/plusone.js" async defer></script> 
  31. <?php } ?> 
  32. <?php }