gglplsn_pos

The Google +1 by BestWebSoft gglplsn pos function.

Description

gglplsn_pos( $content ); 

Parameters (1)

0. $content
The content.

Usage

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

Defined (1)

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

/google-plus-one.php  
  1. function gglplsn_pos( $content ) { 
  2. global $gglplsn_options, $gglplsn_is_button_shown; 
  3.  
  4. if ( is_feed() ) 
  5. return $content; 
  6. $button_content = gglplsn_button_content(); 
  7. if ( 
  8. ! empty( $button_content ) && 
  9. ( ! empty( $gglplsn_options['posts'] ) || ! empty( $gglplsn_options['pages'] ) || ! empty( $gglplsn_options['homepage'] ) ) 
  10. ) { 
  11. if ( ! is_home() && ! is_front_page() ) { 
  12. if ( ( is_single() && ! empty( $gglplsn_options['posts'] ) ) || ( is_page() && ! empty( $gglplsn_options['pages'] ) ) ) { 
  13. $button = '<div class="gglplsn_buttons">' . $button_content . '</div>'; 
  14. } elseif ( ! empty( $gglplsn_options['homepage'] ) ) { 
  15. $button = '<div class="gglplsn_buttons">' . $button_content . '</div>'; 
  16.  
  17. if ( ! empty( $button ) ) { 
  18. $gglplsn_is_button_shown = true; 
  19. if ( 'before_post' == $gglplsn_options['position'] ) { 
  20. return $button . $content; 
  21. } elseif ( 'after_post' == $gglplsn_options['position'] ) { 
  22. return $content . $button; 
  23. } elseif ( 'afterandbefore' == $gglplsn_options['position'] ) { 
  24. return $button . $content . $button; 
  25. } elseif ( 'only_shortcode' == $gglplsn_options['position'] ) { 
  26. return $content; 
  27. return $content;