WP Social Bookmarking Light - Version 1.7.9

Version Description

  • Updated: Added line option to select protocol
Download this release

Release Info

Developer utahvich
Plugin Icon wp plugin WP Social Bookmarking Light
Version 1.7.9
Comparing to
See all releases

Code changes from version 1.7.8 to 1.7.9

modules/admin.php CHANGED
@@ -788,6 +788,15 @@ function wp_social_bookmarking_light_options_page()
788
  <img id='line_img' style="vertical-align:middle" src='<?php echo WP_SOCIAL_BOOKMARKING_LIGHT_IMAGES_URL."/".$options['line']['button_type'] ?>.png'>
789
  </td>
790
  </tr>
 
 
 
 
 
 
 
 
 
791
  </table>
792
  </div>
793
 
788
  <img id='line_img' style="vertical-align:middle" src='<?php echo WP_SOCIAL_BOOKMARKING_LIGHT_IMAGES_URL."/".$options['line']['button_type'] ?>.png'>
789
  </td>
790
  </tr>
791
+ <tr>
792
+ <th scope="row">Protocol:</th>
793
+ <td>
794
+ <select name='line_protocol'>
795
+ <option value='http' <?php if( $options['line']['protocol'] == 'http' ) echo 'selected'; ?>>http://</option>
796
+ <option value='line' <?php if( $options['line']['protocol'] == 'line' ) echo 'selected'; ?>>line://</option>
797
+ </select>
798
+ </td>
799
+ </tr>
800
  </table>
801
  </div>
802
 
modules/options.php CHANGED
@@ -90,7 +90,8 @@ EOT;
90
  'lang' => 'en-US',
91
  'annotation' => 'none',
92
  'inline_size' => '250'),
93
- 'line' => array('button_type' => 'line88x20'),
 
94
  'pocket' => array('button_type' => 'none'),
95
  );
96
  }
@@ -117,8 +118,9 @@ function wp_social_bookmarking_light_options()
117
 
118
  /**
119
  * save options
120
- *
121
  * @param array $data ($_POST)
 
122
  */
123
  function wp_social_bookmarking_light_save_options($data)
124
  {
@@ -156,7 +158,8 @@ function wp_social_bookmarking_light_save_options($data)
156
  'lang' => $data['google_plus_one_lang'],
157
  'annotation' => $data['google_plus_one_annotation'],
158
  'inline_size' => $data['google_plus_one_inline_size']),
159
- 'line' => array('button_type' => $data['line_button_type']),
 
160
  'pocket' => array('button_type' => $data['pocket_button_type']),
161
  );
162
  update_option( 'wp_social_bookmarking_light_options', $options );
90
  'lang' => 'en-US',
91
  'annotation' => 'none',
92
  'inline_size' => '250'),
93
+ 'line' => array('button_type' => 'line88x20',
94
+ 'protocol' => 'http'),
95
  'pocket' => array('button_type' => 'none'),
96
  );
97
  }
118
 
119
  /**
120
  * save options
121
+ *
122
  * @param array $data ($_POST)
123
+ * @return array
124
  */
125
  function wp_social_bookmarking_light_save_options($data)
126
  {
158
  'lang' => $data['google_plus_one_lang'],
159
  'annotation' => $data['google_plus_one_annotation'],
160
  'inline_size' => $data['google_plus_one_inline_size']),
161
+ 'line' => array('button_type' => $data['line_button_type'],
162
+ 'protocol' => $data['line_protocol']),
163
  'pocket' => array('button_type' => $data['pocket_button_type']),
164
  );
165
  update_option( 'wp_social_bookmarking_light_options', $options );
modules/services.php CHANGED
@@ -51,10 +51,11 @@ class WpSocialBookmarkingLight
51
  function link_raw( $url ){
52
  return $url;
53
  }
54
- function link( $url, $alt, $icon, $width, $height ){
55
  $width = $width ? "width='$width'" : "";
56
  $height = $height ? "height='$height'" : "";
57
- return "<a href='{$url}' title='{$alt}' rel=nofollow class='wp_social_bookmarking_light_a' target=_blank>"
 
58
  ."<img src='{$icon}' alt='{$alt}' title='{$alt}' $width $height class='wp_social_bookmarking_light_img' />"
59
  ."</a>";
60
  }
@@ -624,7 +625,13 @@ class WpSocialBookmarkingLight
624
  $width = 20;
625
  $height = 20;
626
  }
627
- return $this->link("http://line.naver.jp/R/msg/text/?{$this->title}%0D%0A{$this->url}", "LINEで送る", $icon, $width, $height);
 
 
 
 
 
 
628
  }
629
 
630
  /**
51
  function link_raw( $url ){
52
  return $url;
53
  }
54
+ function link( $url, $alt, $icon, $width, $height, $blank=true ){
55
  $width = $width ? "width='$width'" : "";
56
  $height = $height ? "height='$height'" : "";
57
+ $blank = $blank ? "target=_blank" : "";
58
+ return "<a href='{$url}' title='{$alt}' rel=nofollow class='wp_social_bookmarking_light_a' $blank>"
59
  ."<img src='{$icon}' alt='{$alt}' title='{$alt}' $width $height class='wp_social_bookmarking_light_img' />"
60
  ."</a>";
61
  }
625
  $width = 20;
626
  $height = 20;
627
  }
628
+
629
+ if ($options['line']['protocol'] === 'line') {
630
+ $url = "line://msg/text/{$this->encode_title}%0D%0A{$this->encode_url}";
631
+ } else {
632
+ $url = "http://line.me/R/msg/text/?{$this->encode_title}%0D%0A{$this->encode_url}";
633
+ }
634
+ return $this->link($url, "LINEで送る", $icon, $width, $height, false);
635
  }
636
 
637
  /**
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: utahvich
3
  Donate link:
4
  Tags: links, social, bookmarks, bookmarking, Hatena, Livedoor Clip, BuzzURL, @nifty clip, Twitter, Tumblr, FC2 Bookmark, newsing, Choix, Yahoo!JAPAN Bookmark, Yahoo!Buzz, Google Bookmark, Delicious, Digg, FriendFeed, Google Buzz, Facebook, reddit, LinkedIn, Evernote, Instapaper, StumbleUpon, mixi, gree, atode, toread, line, pocket
5
  Requires at least: 2.9.0
6
- Tested up to: 3.8
7
- Stable tag: 1.7.8
8
 
9
  This plugin inserts social share links at the top or bottom of each post.
10
 
@@ -61,6 +61,9 @@ This is the list of used social sites:
61
 
62
  == Changelog ==
63
 
 
 
 
64
  = 1.7.8 =
65
  * Updated: Facebook js sdk version 2.0
66
 
3
  Donate link:
4
  Tags: links, social, bookmarks, bookmarking, Hatena, Livedoor Clip, BuzzURL, @nifty clip, Twitter, Tumblr, FC2 Bookmark, newsing, Choix, Yahoo!JAPAN Bookmark, Yahoo!Buzz, Google Bookmark, Delicious, Digg, FriendFeed, Google Buzz, Facebook, reddit, LinkedIn, Evernote, Instapaper, StumbleUpon, mixi, gree, atode, toread, line, pocket
5
  Requires at least: 2.9.0
6
+ Tested up to: 4.1
7
+ Stable tag: 1.7.9
8
 
9
  This plugin inserts social share links at the top or bottom of each post.
10
 
61
 
62
  == Changelog ==
63
 
64
+ = 1.7.9 =
65
+ * Updated: Added line option to select protocol
66
+
67
  = 1.7.8 =
68
  * Updated: Facebook js sdk version 2.0
69
 
wp-social-bookmarking-light.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://www.ninxit.com/blog/2010/06/13/wp-social-bookmarking-light/
5
  Description: This plugin inserts social share links at the top or bottom of each post.
6
  Author: utahta
7
  Author URI: http://www.ninxit.com/blog/
8
- Version: 1.7.8
9
  */
10
  /*
11
  Copyright 2010 utahta (email : labs.ninxit@gmail.com)
5
  Description: This plugin inserts social share links at the top or bottom of each post.
6
  Author: utahta
7
  Author URI: http://www.ninxit.com/blog/
8
+ Version: 1.7.9
9
  */
10
  /*
11
  Copyright 2010 utahta (email : labs.ninxit@gmail.com)