gglplsn_shortcode

The Google +1 by BestWebSoft gglplsn shortcode function.

Description

gglplsn_shortcode( $atts ); 

Parameters (1)

0. $atts
The atts.

Usage

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

Defined (1)

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

/google-plus-one.php  
  1. function gglplsn_shortcode( $atts ) { 
  2. global $gglplsn_options, $gglplsn_is_button_shown; 
  3.  
  4. $buttons = ''; 
  5. $shortcode_atts = shortcode_atts( array( 'display' => 'plusone' ), $atts ); 
  6. $shortcode_atts = ( str_word_count( $shortcode_atts['display'], 1 ) ); 
  7. foreach ( $shortcode_atts as $value ) { 
  8. if ( 'plusone' === $value ) { 
  9. $buttons .= gglplsn_return_button( 'plusone', $gglplsn_options ); 
  10.  
  11. if ( 'share' === $value ) { 
  12. $buttons .= gglplsn_return_button( 'share', $gglplsn_options ); 
  13.  
  14. if ( 'follow' === $value ) { 
  15. $buttons .= gglplsn_return_button( 'follow', $gglplsn_options ); 
  16.  
  17. if ( 'hangout' === $value ) { 
  18. $buttons .= gglplsn_return_button( 'hangout', $gglplsn_options ); 
  19.  
  20. if ( 'badge' === $value ) { 
  21. $buttons .= gglplsn_return_button( 'badge', $gglplsn_options ); 
  22. if ( ! empty( $buttons ) ) { 
  23. $gglplsn_is_button_shown = true; 
  24. return $buttons;