Simple Social Media Share Buttons – Social Sharing for Everyone - Version 1.5

Version Description

Download this release

Release Info

Developer xradar
Plugin Icon 128x128 Simple Social Media Share Buttons – Social Sharing for Everyone
Version 1.5
Comparing to
See all releases

Code changes from version 1.4.3 to 1.5

Files changed (3) hide show
  1. readme.txt +5 -1
  2. simple-social-buttons.php +25 -11
  3. ssb-admin.php +1 -1
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://blog.rabinek.pl/
4
  Tags: facebook, google, twitter, plus one, like it, like, share
5
  Requires at least: 2.8
6
  Tested up to: 3.3.1
7
- Stable tag: 1.4.3
8
 
9
  Insert and customize social buttons: Facebook Like it, Google plus +1 and Twitter share. Share your content with friends.
10
 
@@ -124,3 +124,7 @@ Yes, you can use `<?php get_ssb(); ?>` in your template file (see installation s
124
  * Widget manage page in wp-admin available only for Administrator
125
  * Added German and Spanish translation
126
  * Fine-tuning
 
 
 
 
4
  Tags: facebook, google, twitter, plus one, like it, like, share
5
  Requires at least: 2.8
6
  Tested up to: 3.3.1
7
+ Stable tag: 1.5
8
 
9
  Insert and customize social buttons: Facebook Like it, Google plus +1 and Twitter share. Share your content with friends.
10
 
124
  * Widget manage page in wp-admin available only for Administrator
125
  * Added German and Spanish translation
126
  * Fine-tuning
127
+
128
+ = 1.5 =
129
+ * New asynchronous JS code
130
+ * Minor bug fixed
simple-social-buttons.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin URI: http://blog.rabinek.pl/simple-social-buttons-wordpress/
5
  Description: Insert social buttons into posts and archives: Facebook "Like it", Google Plus One "+1" and Twitter share.
6
  Author: Paweł Rabinek
7
- Version: 1.4.3
8
  Author URI: http://blog.rabinek.pl/
9
  */
10
 
@@ -35,7 +35,7 @@
35
 
36
  class SimpleSocialButtonsPR {
37
  var $pluginName = 'Simple Social Buttons';
38
- var $pluginVersion = '1.4';
39
  var $pluginPrefix = 'ssb_pr_';
40
  var $hideCustomMetaKey = '_ssb_hide';
41
 
@@ -97,7 +97,7 @@ class SimpleSocialButtonsPR {
97
  * Both avoids time-wasting https calls AND provides better SSL-protection if the current server is accessed using HTTPS
98
  */
99
  public function get_current_http( $echo = true ) {
100
- $return = 'http' . (strtolower($_SERVER['HTTPS']) == 'on' ? 's' : '') . '://';
101
 
102
  if($echo != false) {
103
  echo $return;
@@ -124,13 +124,27 @@ class SimpleSocialButtonsPR {
124
  ?>
125
 
126
  <!-- Simple Social Buttons plugin -->
127
- <script type="text/javascript" src="<?php $this->get_current_http(); ?>apis.google.com/js/plusone.js">
128
  //<![CDATA[
129
- {lang: '<?php echo $lang_g; ?>'}
130
- //]]>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
131
  </script>
132
- <script type="text/javascript" src="<?php $this->get_current_http(); ?>platform.twitter.com/widgets.js"></script>
133
- <script type="text/javascript" src="<?php $this->get_current_http(); ?>connect.facebook.net/<?php echo $lang_fb; ?>/all.js#xfbml=1"></script>
134
  <!-- /End of Simple Social Buttons -->
135
 
136
  <?php
@@ -369,13 +383,13 @@ class SimpleSocialButtonsPR {
369
  foreach($arrButtons as $button_name => $button_sort) {
370
  switch($button_name) {
371
  case 'googleplus':
372
- $arrButtonsCode[] = '<div class="simplesocialbutton ssb-button-googleplus"><!-- Google Plus One--><g:plusone size="medium"></g:plusone></div>';
373
  break;
374
  case 'fblike':
375
- $arrButtonsCode[] = '<div class="simplesocialbutton ssb-button-fblike"><!-- Facebook like--><div id="fb-root"></div><fb:like href="'.$permalink.'" send="false" layout="button_count" width="100" show_faces="false" action="like" font=""></fb:like></div>';
376
  break;
377
  case 'twitter':
378
- $arrButtonsCode[] = '<div class="simplesocialbutton ssb-buttom-twitter"><!-- Twitter--><a name="twitter_share" data-count="horizontal" href="http://twitter.com/share" data-text="'.$title.'" data-url="'.$permalink.'" class="twitter-share-button" rel="nofollow"></a></div>';
379
  break;
380
  }
381
  }
4
  Plugin URI: http://blog.rabinek.pl/simple-social-buttons-wordpress/
5
  Description: Insert social buttons into posts and archives: Facebook "Like it", Google Plus One "+1" and Twitter share.
6
  Author: Paweł Rabinek
7
+ Version: 1.5
8
  Author URI: http://blog.rabinek.pl/
9
  */
10
 
35
 
36
  class SimpleSocialButtonsPR {
37
  var $pluginName = 'Simple Social Buttons';
38
+ var $pluginVersion = '1.5';
39
  var $pluginPrefix = 'ssb_pr_';
40
  var $hideCustomMetaKey = '_ssb_hide';
41
 
97
  * Both avoids time-wasting https calls AND provides better SSL-protection if the current server is accessed using HTTPS
98
  */
99
  public function get_current_http( $echo = true ) {
100
+ $return = 'http' . (strtolower(@$_SERVER['HTTPS']) == 'on' ? 's' : '') . '://';
101
 
102
  if($echo != false) {
103
  echo $return;
124
  ?>
125
 
126
  <!-- Simple Social Buttons plugin -->
127
+ <script type="text/javascript">
128
  //<![CDATA[
129
+ // google plus
130
+ window.___gcfg = {lang: '<?php echo $lang_g; ?>'};
131
+ (function() {
132
+ var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
133
+ po.src = 'https://apis.google.com/js/plusone.js';
134
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
135
+ })();
136
+ // facebook
137
+ (function(d, s, id) {
138
+ var js, fjs = d.getElementsByTagName(s)[0];
139
+ if (d.getElementById(id)) return;
140
+ js = d.createElement(s); js.id = id;
141
+ js.src = "//connect.facebook.net/<?php echo $lang_fb; ?>/all.js#xfbml=1";
142
+ fjs.parentNode.insertBefore(js, fjs);
143
+ }(document, 'script', 'facebook-jssdk'));
144
+ // twitter
145
+ !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
146
+ // ]]>
147
  </script>
 
 
148
  <!-- /End of Simple Social Buttons -->
149
 
150
  <?php
383
  foreach($arrButtons as $button_name => $button_sort) {
384
  switch($button_name) {
385
  case 'googleplus':
386
+ $arrButtonsCode[] = '<div class="simplesocialbutton ssb-button-googleplus"><!-- Google Plus One--><div class="g-plusone" data-size="medium" data-href="'.$permalink.'"></div></div>';
387
  break;
388
  case 'fblike':
389
+ $arrButtonsCode[] = '<div class="simplesocialbutton ssb-button-fblike"><!-- Facebook like--><div class="fb-like" data-href="'.$permalink.'" data-send="false" data-layout="button_count" data-width="100" data-show-faces="false"></div></div>';
390
  break;
391
  case 'twitter':
392
+ $arrButtonsCode[] = '<div class="simplesocialbutton ssb-buttom-twitter"><!-- Twitter--><a href="https://twitter.com/share" class="twitter-share-button" data-text="'.$title.'" data-url="'.$permalink.'" rel="nofollow"></a></div>';
393
  break;
394
  }
395
  }
ssb-admin.php CHANGED
@@ -198,7 +198,7 @@ extract( $settings, EXTR_PREFIX_ALL, 'ssb' );
198
  <ul>
199
  <li><a href="http://www.site5.com/in.php?id=53542" target="_blank"><?php _e('Unlimited web hosting', 'simplesocialbuttons'); ?></a></li>
200
  <li><a href="http://www.webceo.com/cgi-bin/go/clickthru.cgi?id=xradar" target="_blank"><?php _e('Best SEO software', 'simplesocialbuttons'); ?></a></li>
201
- <li><a href="http://themeforest.net?ref=xradar" target="_blank"><?php _e('Wordpress templates', 'simplesocialbuttons'); ?></a><li>
202
  </ul>
203
  </div>
204
  </div>
198
  <ul>
199
  <li><a href="http://www.site5.com/in.php?id=53542" target="_blank"><?php _e('Unlimited web hosting', 'simplesocialbuttons'); ?></a></li>
200
  <li><a href="http://www.webceo.com/cgi-bin/go/clickthru.cgi?id=xradar" target="_blank"><?php _e('Best SEO software', 'simplesocialbuttons'); ?></a></li>
201
+ <li><a href="http://themeforest.net?ref=xradar" target="_blank"><?php _e('Wordpress templates', 'simplesocialbuttons'); ?></a></li>
202
  </ul>
203
  </div>
204
  </div>