gglplsn_settings

The Google +1 by BestWebSoft gglplsn settings function.

Description

gglplsn_settings(); 

Usage

  1. if ( !function_exists( 'gglplsn_settings' ) ) { 
  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_settings(); 
  7.  

Defined (1)

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

/google-plus-one.php  
  1. function gglplsn_settings() { 
  2. global $gglplsn_options, $gglplsn_plugin_info, $gglplsn_option_defaults; 
  3.  
  4. /** Default options */ 
  5. $gglplsn_option_defaults = array( 
  6. 'plugin_option_version' => $gglplsn_plugin_info['Version'],  
  7. 'plus_one_js' => 1,  
  8. 'plus_one_annotation' => 'none',  
  9. 'plus_one_size' => 'standard',  
  10. 'plus_one_annotation_type' => 'standard',  
  11. 'share_js' => 0,  
  12. 'share_size' => 20,  
  13. 'share_annotation' => 'none',  
  14. 'share_annotation_type' => 'standard',  
  15. 'follow_js' => 0,  
  16. 'follow_size' => 20,  
  17. 'follow_annotation' => 'none',  
  18. 'follow_relationship' => 'author',  
  19. 'follow_id' => '',  
  20. 'hangout_js' => 0,  
  21. 'hangout_topic' => '',  
  22. 'hangout_topic_title' => 1,  
  23. 'hangout_size' => 'standard',  
  24. 'hangout_type' => 'normal',  
  25. 'hangout_invite_type' => array(),  
  26. 'hangout_invite_id' => array(),  
  27. 'badge_js' => 0,  
  28. 'badge_type' => 'person',  
  29. 'badge_id' => '',  
  30. 'badge_layout' => 'portrait',  
  31. 'badge_show_cover' => false,  
  32. 'badge_show_tagline' => false,  
  33. 'badge_show_owners' => false,  
  34. 'badge_theme' => 'light',  
  35. 'badge_width' => 300,  
  36. 'position' => 'before_post',  
  37. 'posts' => 1,  
  38. 'pages' => 1,  
  39. 'homepage' => 1,  
  40. 'lang' => 'en',  
  41. 'use_multilanguage_locale' => 0,  
  42. 'display_settings_notice' => 1,  
  43. 'first_install' => strtotime( "now" ),  
  44. 'suggest_feature_banner' => 1 
  45. ); 
  46.  
  47. if ( ! get_option( 'gglplsn_options' ) ) 
  48. add_option( 'gglplsn_options', $gglplsn_option_defaults ); 
  49.  
  50. $gglplsn_options = get_option( 'gglplsn_options' ); 
  51.  
  52. if ( ! isset( $gglplsn_options['plugin_option_version'] ) || $gglplsn_options['plugin_option_version'] != $gglplsn_plugin_info["Version"] ) { 
  53.  
  54. /** 
  55. * @deprecated since 1.2.8 
  56. * @todo remove 
  57. */ 
  58. if ( isset( $gglplsn_options['annotation'] ) ) { 
  59. if ( is_numeric( $gglplsn_options['annotation'] ) ) { 
  60. $gglplsn_options['plus_one_annotation'] = 1 == $gglplsn_options['annotation'] ? 'bubble' : 'none' ; 
  61. } else { 
  62. $gglplsn_options['plus_one_annotation'] = $gglplsn_options['annotation']; 
  63.  
  64. unset( $gglplsn_options['annotation'] ); 
  65.  
  66. /** 
  67. * @deprecated since 1.2.8 
  68. * @todo remove 
  69. */ 
  70. if ( isset( $gglplsn_options['js'] ) ) { 
  71. $gglplsn_options['plus_one_js'] = $gglplsn_options['js']; 
  72. $gglplsn_options['plus_one_size'] = $gglplsn_options['size']; 
  73. unset( $gglplsn_options['js'] ); 
  74. unset( $gglplsn_options['size'] ); 
  75.  
  76. $gglplsn_option_defaults['display_settings_notice'] = 0; 
  77. $gglplsn_options = array_merge( $gglplsn_option_defaults, $gglplsn_options ); 
  78. $gglplsn_options['plugin_option_version'] = $gglplsn_plugin_info["Version"]; 
  79. /** show pro features */ 
  80. $gglplsn_options['hide_premium_options'] = array(); 
  81.  
  82. update_option( 'gglplsn_options', $gglplsn_options );