Version Description
- Added: Grow! Button.
- Fixed: Validation fails.
Download this release
Release Info
Developer | utahvich |
Plugin | WP Social Bookmarking Light |
Version | 1.7.0 |
Comparing to | |
See all releases |
Code changes from version 1.6.9 to 1.7.0
- modules/admin.php +21 -1
- modules/content.php +9 -2
- modules/options.php +5 -1
- modules/services.php +21 -2
- readme.txt +7 -2
- wp-social-bookmarking-light.php +1 -1
modules/admin.php
CHANGED
@@ -181,7 +181,7 @@ function wsbl_update_services(is_simply)
|
|
181 |
jQuery("#services_id").val(vals);
|
182 |
|
183 |
is_simply = is_simply || false;
|
184 |
-
var services = ['mixi', 'twitter', 'hatena_button', 'facebook', 'gree', 'evernote', 'tumblr', 'atode', 'google_plus_one'];
|
185 |
for(var i in services){
|
186 |
wsbl_tab_toggle(services[i], is_simply);
|
187 |
}
|
@@ -279,6 +279,7 @@ function wp_social_bookmarking_light_options_page()
|
|
279 |
<li id='tumblr_settings'><a href="#tabs-9"><span><?php _el("tumblr") ?></span></a></li>
|
280 |
<li id='atode_settings'><a href="#tabs-10"><span><?php _el("atode") ?></span></a></li>
|
281 |
<li id='google_plus_one_settings'><a href="#tabs-11"><span><?php _el("google_plus_one") ?></span></a></li>
|
|
|
282 |
</ul>
|
283 |
|
284 |
<!-- General -->
|
@@ -764,6 +765,24 @@ function wp_social_bookmarking_light_options_page()
|
|
764 |
</table>
|
765 |
</div>
|
766 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
767 |
</div>
|
768 |
<p class="submit">
|
769 |
<input class="button-primary" type="submit" name='save' value='<?php _e('Save Changes') ?>' />
|
@@ -812,6 +831,7 @@ function wp_social_bookmarking_light_options_page()
|
|
812 |
<tr><td>mixi_like</td><td>mixi Like (require <a href="http://developer.mixi.co.jp/connect/mixi_plugin/mixi_check/mixicheck" onclick="window.open('http://developer.mixi.co.jp/connect/mixi_plugin/mixi_check/mixicheck'); return false;" >mixi check key</a>)</td></tr>
|
813 |
<tr><td>gree</td><td>GREE Social Feedback</td></tr>
|
814 |
<tr><td>atode</td><td>atode (toread)</td></tr>
|
|
|
815 |
</table>
|
816 |
</div>
|
817 |
|
181 |
jQuery("#services_id").val(vals);
|
182 |
|
183 |
is_simply = is_simply || false;
|
184 |
+
var services = ['mixi', 'twitter', 'hatena_button', 'facebook', 'gree', 'evernote', 'tumblr', 'atode', 'google_plus_one', 'grow'];
|
185 |
for(var i in services){
|
186 |
wsbl_tab_toggle(services[i], is_simply);
|
187 |
}
|
279 |
<li id='tumblr_settings'><a href="#tabs-9"><span><?php _el("tumblr") ?></span></a></li>
|
280 |
<li id='atode_settings'><a href="#tabs-10"><span><?php _el("atode") ?></span></a></li>
|
281 |
<li id='google_plus_one_settings'><a href="#tabs-11"><span><?php _el("google_plus_one") ?></span></a></li>
|
282 |
+
<li id='grow_settings'><a href="#tabs-12"><span><?php _el("grow") ?></span></a></li>
|
283 |
</ul>
|
284 |
|
285 |
<!-- General -->
|
765 |
</table>
|
766 |
</div>
|
767 |
|
768 |
+
<!-- grow! button -->
|
769 |
+
<div id="tabs-12">
|
770 |
+
<table class='form-table'>
|
771 |
+
<tr>
|
772 |
+
<th scope="row">apikey</th>
|
773 |
+
<td> <input type="text" name='grow_apikey' value="<?php echo $options['grow']["apikey"] ?>" size=50 /></td>
|
774 |
+
</tr>
|
775 |
+
<tr>
|
776 |
+
<th scope="row">Button type</th>
|
777 |
+
<td>
|
778 |
+
<input id="square" type="radio" name="grow_button_type" value="square" <?php if('square' == $options['grow']["button_type"]):?> checked="checked" <?php endif; ?>><label for="square">Square</label>
|
779 |
+
<br/>
|
780 |
+
<input id="rectangle" type="radio" name="grow_button_type" value="rectangle" <?php if('rectangle' == $options['grow']["button_type"]):?> checked="checked" <?php endif; ?>><label for="rectangle">Rectangle</label>
|
781 |
+
</td>
|
782 |
+
</tr>
|
783 |
+
</table>
|
784 |
+
</div>
|
785 |
+
|
786 |
</div>
|
787 |
<p class="submit">
|
788 |
<input class="button-primary" type="submit" name='save' value='<?php _e('Save Changes') ?>' />
|
831 |
<tr><td>mixi_like</td><td>mixi Like (require <a href="http://developer.mixi.co.jp/connect/mixi_plugin/mixi_check/mixicheck" onclick="window.open('http://developer.mixi.co.jp/connect/mixi_plugin/mixi_check/mixicheck'); return false;" >mixi check key</a>)</td></tr>
|
832 |
<tr><td>gree</td><td>GREE Social Feedback</td></tr>
|
833 |
<tr><td>atode</td><td>atode (toread)</td></tr>
|
834 |
+
<tr><td>grow!</td><td>grow! button (require <a href="http://growbutton.com/setting#!get_button" onclick="window.open('http://growbutton.com/setting#!get_button'); return false;" >apikey</a>)</td></tr>
|
835 |
</table>
|
836 |
</div>
|
837 |
|
modules/content.php
CHANGED
@@ -90,12 +90,12 @@ function wp_social_bookmarking_light_wp_head()
|
|
90 |
if(in_array('facebook_like', $services) || in_array('facebook_send', $services)){
|
91 |
$locale = $options['facebook']['locale'];
|
92 |
$locale = ($locale == '' ? 'en_US' : $locale);
|
93 |
-
echo '<script src="http://connect.facebook.net/'.$locale.'/all.js#xfbml=1"></script>'."\n";
|
94 |
}
|
95 |
// Google +1
|
96 |
if(in_array('google_plus_one', $services)){
|
97 |
$lang = $options['google_plus_one']['lang'];
|
98 |
-
echo '<script src="http://apis.google.com/js/plusone.js">{lang:\''.$lang.'\'}</script>'."\n";
|
99 |
}
|
100 |
|
101 |
// css
|
@@ -162,6 +162,13 @@ function wp_social_bookmarking_light_wp_footer()
|
|
162 |
if(in_array('evernote', $services)){
|
163 |
echo '<script type="text/javascript" src="http://static.evernote.com/noteit.js"></script>'."\n";
|
164 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
165 |
?>
|
166 |
<!-- END: WP Social Bookmarking Light -->
|
167 |
<?php
|
90 |
if(in_array('facebook_like', $services) || in_array('facebook_send', $services)){
|
91 |
$locale = $options['facebook']['locale'];
|
92 |
$locale = ($locale == '' ? 'en_US' : $locale);
|
93 |
+
echo '<script type="text/javascript" src="http://connect.facebook.net/'.$locale.'/all.js#xfbml=1"></script>'."\n";
|
94 |
}
|
95 |
// Google +1
|
96 |
if(in_array('google_plus_one', $services)){
|
97 |
$lang = $options['google_plus_one']['lang'];
|
98 |
+
echo '<script type="text/javascript" src="http://apis.google.com/js/plusone.js">{lang:\''.$lang.'\'}</script>'."\n";
|
99 |
}
|
100 |
|
101 |
// css
|
162 |
if(in_array('evernote', $services)){
|
163 |
echo '<script type="text/javascript" src="http://static.evernote.com/noteit.js"></script>'."\n";
|
164 |
}
|
165 |
+
|
166 |
+
if(in_array('grow', $services)){
|
167 |
+
$apikey = $options['grow']['apikey'];
|
168 |
+
if($apikey){
|
169 |
+
echo '<script type="text/javascript" src="http://growbutton.com/javascripts/button.js?apikey=' . $apikey . '&shape=' . $options['grow']['button_type'] .'&insert=false"></script>'."\n";
|
170 |
+
}
|
171 |
+
}
|
172 |
?>
|
173 |
<!-- END: WP Social Bookmarking Light -->
|
174 |
<?php
|
modules/options.php
CHANGED
@@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
22 |
*/
|
23 |
function wp_social_bookmarking_light_default_options()
|
24 |
{
|
25 |
-
return array( "services" => "hatena, hatena_users, facebook, google_buzz, yahoo, livedoor, friendfeed, tweetmeme",
|
26 |
"position" => "top",
|
27 |
"single_page" => true,
|
28 |
"is_page" => true,
|
@@ -58,6 +58,8 @@ function wp_social_bookmarking_light_default_options()
|
|
58 |
'google_plus_one' => array('button_size' => 'medium',
|
59 |
'lang' => 'en-US',
|
60 |
'count' => true),
|
|
|
|
|
61 |
);
|
62 |
}
|
63 |
|
@@ -122,6 +124,8 @@ function wp_social_bookmarking_light_save_options($data)
|
|
122 |
'google_plus_one' => array('button_size' => $data['google_plus_one_button_size'],
|
123 |
'lang' => $data['google_plus_one_lang'],
|
124 |
'count' => $data['google_plus_one_count'] == 'true'),
|
|
|
|
|
125 |
);
|
126 |
update_option( 'wp_social_bookmarking_light_options', $options );
|
127 |
return $options;
|
22 |
*/
|
23 |
function wp_social_bookmarking_light_default_options()
|
24 |
{
|
25 |
+
return array( "services" => "hatena, hatena_users, facebook, google_buzz, yahoo, livedoor, friendfeed, tweetmeme, grow",
|
26 |
"position" => "top",
|
27 |
"single_page" => true,
|
28 |
"is_page" => true,
|
58 |
'google_plus_one' => array('button_size' => 'medium',
|
59 |
'lang' => 'en-US',
|
60 |
'count' => true),
|
61 |
+
'grow' => array('button_type' => 'square' ,
|
62 |
+
'apikey' => ''),
|
63 |
);
|
64 |
}
|
65 |
|
124 |
'google_plus_one' => array('button_size' => $data['google_plus_one_button_size'],
|
125 |
'lang' => $data['google_plus_one_lang'],
|
126 |
'count' => $data['google_plus_one_count'] == 'true'),
|
127 |
+
'grow' => array('button_type' => $data['grow_button_type'] ,
|
128 |
+
'apikey' => $data['grow_apikey']),
|
129 |
);
|
130 |
update_option( 'wp_social_bookmarking_light_options', $options );
|
131 |
return $options;
|
modules/services.php
CHANGED
@@ -31,12 +31,12 @@ class WpSocialBookmarkingLight
|
|
31 |
function WpSocialBookmarkingLight( $url, $title, $blogname )
|
32 |
{
|
33 |
$title = $this->to_utf8( $title );
|
34 |
-
$blogname = $this->to_utf8( $blogname );
|
35 |
$this->url = $url;
|
36 |
$this->title = $title;
|
37 |
$this->encode_url = rawurlencode( $url );
|
38 |
$this->encode_title = rawurlencode( $title );
|
39 |
-
$this->encode_blogname = rawurlencode( $blogname );
|
40 |
}
|
41 |
|
42 |
function to_utf8( $str )
|
@@ -552,6 +552,25 @@ class WpSocialBookmarkingLight
|
|
552 |
}
|
553 |
return '';
|
554 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
555 |
}
|
556 |
|
557 |
/**
|
31 |
function WpSocialBookmarkingLight( $url, $title, $blogname )
|
32 |
{
|
33 |
$title = $this->to_utf8( $title );
|
34 |
+
$this->blogname = $this->to_utf8( $blogname );
|
35 |
$this->url = $url;
|
36 |
$this->title = $title;
|
37 |
$this->encode_url = rawurlencode( $url );
|
38 |
$this->encode_title = rawurlencode( $title );
|
39 |
+
$this->encode_blogname = rawurlencode( $this->blogname );
|
40 |
}
|
41 |
|
42 |
function to_utf8( $str )
|
552 |
}
|
553 |
return '';
|
554 |
}
|
555 |
+
|
556 |
+
/**
|
557 |
+
* @brief grow!
|
558 |
+
*/
|
559 |
+
function grow()
|
560 |
+
{
|
561 |
+
$site_name = $this->blogname;
|
562 |
+
$link = $this->url;
|
563 |
+
$title = $this->title;
|
564 |
+
$button_type = $options['grow']['button_type'];
|
565 |
+
|
566 |
+
return '<span class="growbutton">' .
|
567 |
+
'<span style="display: none;" itemscope itemref="' . $button_type . '" itemtype="http://growbutton.com/ns#button">'.
|
568 |
+
'<span itemprop="url">' . $link . '</span>'.
|
569 |
+
'<span itemprop="title">' . $title . '</span>'.
|
570 |
+
'<span itemprop="image"></span>' .
|
571 |
+
'<span itemprop="site_name">'. $site_name . '</span>'.
|
572 |
+
'</span>';
|
573 |
+
}
|
574 |
}
|
575 |
|
576 |
/**
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
=== WP Social Bookmarking Light ===
|
2 |
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
|
5 |
Requires at least: 2.9.0
|
6 |
Tested up to: 3.1.2
|
7 |
-
Stable tag: 1.
|
8 |
|
9 |
This plugin inserts social share links at the top or bottom of each post.
|
10 |
|
@@ -43,6 +43,7 @@ This is the list of used social sites:
|
|
43 |
* mixi Like
|
44 |
* GREE Social Feedback
|
45 |
* atode (toread)
|
|
|
46 |
|
47 |
== Installation ==
|
48 |
|
@@ -58,6 +59,10 @@ This is the list of used social sites:
|
|
58 |
|
59 |
== Changelog ==
|
60 |
|
|
|
|
|
|
|
|
|
61 |
= 1.6.9 =
|
62 |
* Added: mixi Like Button.
|
63 |
* Improved: Some options.
|
1 |
=== WP Social Bookmarking Light ===
|
2 |
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, grow!
|
5 |
Requires at least: 2.9.0
|
6 |
Tested up to: 3.1.2
|
7 |
+
Stable tag: 1.7.0
|
8 |
|
9 |
This plugin inserts social share links at the top or bottom of each post.
|
10 |
|
43 |
* mixi Like
|
44 |
* GREE Social Feedback
|
45 |
* atode (toread)
|
46 |
+
* Grow!
|
47 |
|
48 |
== Installation ==
|
49 |
|
59 |
|
60 |
== Changelog ==
|
61 |
|
62 |
+
= 1.7.0 =
|
63 |
+
* Added: Grow! Button.
|
64 |
+
* Fixed: Validation fails.
|
65 |
+
|
66 |
= 1.6.9 =
|
67 |
* Added: mixi Like Button.
|
68 |
* Improved: Some options.
|
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.
|
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.0
|
9 |
*/
|
10 |
/*
|
11 |
Copyright 2010 utahta (email : labs.ninxit@gmail.com)
|