Version Description
- Support for custom post types. It is now possible to show or hide share buttons for each custom post type.
Download this release
Release Info
Developer | kasal |
Plugin | Hupso Share Buttons for Twitter, Facebook & Google+ |
Version | 3.9.19 |
Comparing to | |
See all releases |
Code changes from version 3.9.18 to 3.9.19
- readme.txt +7 -3
- share-buttons-hupso.php +77 -3
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
=== Hupso Share Buttons for Twitter, Facebook & Google+ ===
|
2 |
Contributors: kasal
|
3 |
Donate link: http://www.hupso.com/
|
4 |
-
Tags: twitter, facebook, google, social sharing, share buttons, social share buttons, share icons, stumbleupon, addthis, sharethis, sexybookmarks, addtoany, multisite, pinterest, print, tumblr
|
5 |
Requires at least: 2.8
|
6 |
Tested up to: 3.6
|
7 |
-
Stable tag: 3.9.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -20,7 +20,7 @@ These services are used by millions of people every day, so sharing your content
|
|
20 |
|
21 |
* Slick, minimalistic design.
|
22 |
* Very small and fast. The code for sharing button is very small (only a few KB), so share buttons will not slow down your website - even on devices with slow network connections.
|
23 |
-
* All major social networks are supported: Twitter, Facebook (Facebook Share / Facebook Like / Facebook Send), Google Plus, Linkedin, Tumblr, Pinterest, StumbleUpon, Digg, Reddit, Bebo, Delicious, VKontakte
|
24 |
* Social media counters: Twitter Tweet, Facebook Like, Google +1, Linkedin Share, Pinterest - Pin it
|
25 |
* Compatible with all major web browsers: Firefox, Chrome, Internet Explorer, Safari, Opera.
|
26 |
* Share toolbar works with desktop and mobile devices (mobile phones and tablets). Tested with PC, Apple iOS / iPhone / iPad and Google Android devices.
|
@@ -44,6 +44,7 @@ These services are used by millions of people every day, so sharing your content
|
|
44 |
* Print button
|
45 |
* All share buttons are optional: You can add or remove any button from plugin settings
|
46 |
* Multisite support (works with Wordpress Multi-site)
|
|
|
47 |
|
48 |
Share Buttons are *very easy to configure*. Just select button type, size, position and which social networking services do you want to offer to your visitors.
|
49 |
Buttons will appear below your articles or on top of them (or both) as you choose.
|
@@ -285,6 +286,9 @@ Please send bug reports and suggestion using [this feedback form](http://www.hup
|
|
285 |
|
286 |
== Changelog ==
|
287 |
|
|
|
|
|
|
|
288 |
= 3.9.18 =
|
289 |
* VKontakte button
|
290 |
* Added Traditional Chinese translation
|
1 |
=== Hupso Share Buttons for Twitter, Facebook & Google+ ===
|
2 |
Contributors: kasal
|
3 |
Donate link: http://www.hupso.com/
|
4 |
+
Tags: twitter, facebook, google, social sharing, share buttons, social share buttons, share icons, stumbleupon, addthis, sharethis, sexybookmarks, addtoany, multisite, pinterest, print, tumblr
|
5 |
Requires at least: 2.8
|
6 |
Tested up to: 3.6
|
7 |
+
Stable tag: 3.9.19
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
20 |
|
21 |
* Slick, minimalistic design.
|
22 |
* Very small and fast. The code for sharing button is very small (only a few KB), so share buttons will not slow down your website - even on devices with slow network connections.
|
23 |
+
* All major social networks are supported: Twitter, Facebook (Facebook Share / Facebook Like / Facebook Send), Google Plus, Linkedin, Tumblr, Pinterest, StumbleUpon, Digg, Reddit, Bebo, Delicious, VKontakte.
|
24 |
* Social media counters: Twitter Tweet, Facebook Like, Google +1, Linkedin Share, Pinterest - Pin it
|
25 |
* Compatible with all major web browsers: Firefox, Chrome, Internet Explorer, Safari, Opera.
|
26 |
* Share toolbar works with desktop and mobile devices (mobile phones and tablets). Tested with PC, Apple iOS / iPhone / iPad and Google Android devices.
|
44 |
* Print button
|
45 |
* All share buttons are optional: You can add or remove any button from plugin settings
|
46 |
* Multisite support (works with Wordpress Multi-site)
|
47 |
+
* Support for custom post types (it is possible to show or hide share buttons for each custom post type)
|
48 |
|
49 |
Share Buttons are *very easy to configure*. Just select button type, size, position and which social networking services do you want to offer to your visitors.
|
50 |
Buttons will appear below your articles or on top of them (or both) as you choose.
|
286 |
|
287 |
== Changelog ==
|
288 |
|
289 |
+
= 3.9.19 =
|
290 |
+
* Support for custom post types. It is now possible to show or hide share buttons for each custom post type.
|
291 |
+
|
292 |
= 3.9.18 =
|
293 |
* VKontakte button
|
294 |
* Added Traditional Chinese translation
|
share-buttons-hupso.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Hupso Share Buttons for Twitter, Facebook & Google+
|
4 |
Plugin URI: http://www.hupso.com/share/
|
5 |
Description: Add simple social sharing buttons to your articles. Your visitors will be able to easily share your content on the most popular social networks: Twitter, Facebook, Google Plus, Linkedin, Tumblr, Pinterest, StumbleUpon, Digg, Reddit, Bebo, VKontakte and Delicous. These services are used by millions of people every day, so sharing your content there will increase traffic to your website.
|
6 |
-
Version: 3.9.
|
7 |
Author: kasal
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -12,7 +12,7 @@ Domain Path: /languages
|
|
12 |
*/
|
13 |
|
14 |
global $HUPSO_VERSION;
|
15 |
-
$HUPSO_VERSION = '3.9.
|
16 |
|
17 |
$hupso_dev = '';
|
18 |
$hupso_state = 'normal';
|
@@ -168,7 +168,22 @@ function hupso_plugin_uninstall() {
|
|
168 |
delete_option( 'hupso_image_folder_url' );
|
169 |
delete_option( 'hupso_background_color' );
|
170 |
delete_option( 'hupso_border_color' );
|
171 |
-
delete_option( 'hupso_meta_box' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
172 |
}
|
173 |
|
174 |
function hupso_plugin_activation() {
|
@@ -713,6 +728,35 @@ function hupso_admin_settings_show() {
|
|
713 |
<input type="checkbox" name="hupso_show_excerpts" value="1" <?php echo $hupso_show_excerpts_checked; ?> /> <?php _e('Excerpts', 'hupso'); ?><br/>
|
714 |
<input type="checkbox" name="hupso_show_search" value="1" <?php echo $hupso_show_search_checked; ?> /> <?php _e('Search pages', 'hupso'); ?><br/>
|
715 |
<input type="checkbox" name="hupso_password_protected" value="1" <?php echo $hupso_password_protected_checked; ?> /> <?php _e('Password protected posts', 'hupso'); ?><br/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
716 |
<br/><?php echo __('If you want to show share buttons just on some posts/pages do this:', 'hupso') . ' ' . __('1. Clear options for posts/pages above', 'hupso') . ', ' . __('2. Enable Add share buttons option to "Edit Post" screen - below', 'hupso') . ', ' . __('3. Edit any post or page and configure display of share buttons at the bottom of right sidebar (on "Edit Post" screen)', 'hupso') . '<br/>';
|
717 |
/* add meta box */
|
718 |
$checked = ' checked="checked" ';
|
@@ -1186,6 +1230,24 @@ function hupso_admin_settings_save() {
|
|
1186 |
update_option( 'hupso_meta_box', $hupso_meta_box );
|
1187 |
}
|
1188 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1189 |
|
1190 |
|
1191 |
}
|
@@ -1245,6 +1307,18 @@ function hupso_the_content( $content ) {
|
|
1245 |
return $content;
|
1246 |
}
|
1247 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1248 |
/* Do now show share buttons when [hupso_hide] is used */
|
1249 |
if ( ($hupso_state == 'normal') && ( stripos($content, '[hupso_hide]') !== false ) ) {
|
1250 |
$content = str_ireplace('[hupso_hide]', '', $content);
|
3 |
Plugin Name: Hupso Share Buttons for Twitter, Facebook & Google+
|
4 |
Plugin URI: http://www.hupso.com/share/
|
5 |
Description: Add simple social sharing buttons to your articles. Your visitors will be able to easily share your content on the most popular social networks: Twitter, Facebook, Google Plus, Linkedin, Tumblr, Pinterest, StumbleUpon, Digg, Reddit, Bebo, VKontakte and Delicous. These services are used by millions of people every day, so sharing your content there will increase traffic to your website.
|
6 |
+
Version: 3.9.19
|
7 |
Author: kasal
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
*/
|
13 |
|
14 |
global $HUPSO_VERSION;
|
15 |
+
$HUPSO_VERSION = '3.9.19';
|
16 |
|
17 |
$hupso_dev = '';
|
18 |
$hupso_state = 'normal';
|
168 |
delete_option( 'hupso_image_folder_url' );
|
169 |
delete_option( 'hupso_background_color' );
|
170 |
delete_option( 'hupso_border_color' );
|
171 |
+
delete_option( 'hupso_meta_box' );
|
172 |
+
|
173 |
+
/* Delete custom post types */
|
174 |
+
$args = array(
|
175 |
+
'public' => true,
|
176 |
+
'_builtin' => false
|
177 |
+
);
|
178 |
+
$output = 'names'; // names or objects, note names is the default
|
179 |
+
$operator = 'and'; // 'and' or 'or'
|
180 |
+
$post_types = get_post_types( $args, $output, $operator );
|
181 |
+
|
182 |
+
foreach ( $post_types as $post_type ) {
|
183 |
+
$name = 'hupso_custom_post_' . $post_type;
|
184 |
+
delete_option( $name );
|
185 |
+
}
|
186 |
+
|
187 |
}
|
188 |
|
189 |
function hupso_plugin_activation() {
|
728 |
<input type="checkbox" name="hupso_show_excerpts" value="1" <?php echo $hupso_show_excerpts_checked; ?> /> <?php _e('Excerpts', 'hupso'); ?><br/>
|
729 |
<input type="checkbox" name="hupso_show_search" value="1" <?php echo $hupso_show_search_checked; ?> /> <?php _e('Search pages', 'hupso'); ?><br/>
|
730 |
<input type="checkbox" name="hupso_password_protected" value="1" <?php echo $hupso_password_protected_checked; ?> /> <?php _e('Password protected posts', 'hupso'); ?><br/>
|
731 |
+
|
732 |
+
<?php
|
733 |
+
/* Custom post types */
|
734 |
+
$args = array(
|
735 |
+
'public' => true,
|
736 |
+
'_builtin' => false
|
737 |
+
);
|
738 |
+
$output = 'names'; // names or objects, note names is the default
|
739 |
+
$operator = 'and'; // 'and' or 'or'
|
740 |
+
$post_types = get_post_types( $args, $output, $operator );
|
741 |
+
|
742 |
+
if ( count($post_types) > 0) {
|
743 |
+
echo '<p>' . __('Custom post types:', 'hupso') . '</p>';
|
744 |
+
|
745 |
+
foreach ( $post_types as $post_type ) {
|
746 |
+
$name = 'hupso_custom_post_' . $post_type;
|
747 |
+
$val = get_option( $name, '1' );
|
748 |
+
if ($val == '1') {
|
749 |
+
$checked = ' checked="checked" ';
|
750 |
+
}
|
751 |
+
else {
|
752 |
+
$checked = '';
|
753 |
+
}
|
754 |
+
echo '<input type="checkbox" name="' . $name .'" value="1" ' . $checked.' > ' . $post_type . '<br/>';
|
755 |
+
}
|
756 |
+
}
|
757 |
+
|
758 |
+
?>
|
759 |
+
|
760 |
<br/><?php echo __('If you want to show share buttons just on some posts/pages do this:', 'hupso') . ' ' . __('1. Clear options for posts/pages above', 'hupso') . ', ' . __('2. Enable Add share buttons option to "Edit Post" screen - below', 'hupso') . ', ' . __('3. Edit any post or page and configure display of share buttons at the bottom of right sidebar (on "Edit Post" screen)', 'hupso') . '<br/>';
|
761 |
/* add meta box */
|
762 |
$checked = ' checked="checked" ';
|
1230 |
update_option( 'hupso_meta_box', $hupso_meta_box );
|
1231 |
}
|
1232 |
|
1233 |
+
/* save custom post types */
|
1234 |
+
$args = array(
|
1235 |
+
'public' => true,
|
1236 |
+
'_builtin' => false
|
1237 |
+
);
|
1238 |
+
$output = 'names'; // names or objects, note names is the default
|
1239 |
+
$operator = 'and'; // 'and' or 'or'
|
1240 |
+
$post_types = get_post_types( $args, $output, $operator );
|
1241 |
+
foreach ( $post_types as $post_type ) {
|
1242 |
+
$name = 'hupso_custom_post_' . $post_type;
|
1243 |
+
$val = @$_POST[$name];
|
1244 |
+
if ($val == '') {
|
1245 |
+
update_option ( $name, '0' );
|
1246 |
+
}
|
1247 |
+
else {
|
1248 |
+
delete_option ( $name );
|
1249 |
+
}
|
1250 |
+
}
|
1251 |
|
1252 |
|
1253 |
}
|
1307 |
return $content;
|
1308 |
}
|
1309 |
|
1310 |
+
/* Check custom post types */
|
1311 |
+
if (isset($post)) {
|
1312 |
+
$name = 'hupso_custom_post_' . $post->post_type;
|
1313 |
+
}
|
1314 |
+
$val = get_option( $name, '1' );
|
1315 |
+
if ($val == '0') {
|
1316 |
+
$content = str_ireplace('[hupso_hide]', '', $content);
|
1317 |
+
$content = str_ireplace('[hupso]', '', $content);
|
1318 |
+
if ($value != 'enabled')
|
1319 |
+
return $content;
|
1320 |
+
}
|
1321 |
+
|
1322 |
/* Do now show share buttons when [hupso_hide] is used */
|
1323 |
if ( ($hupso_state == 'normal') && ( stripos($content, '[hupso_hide]') !== false ) ) {
|
1324 |
$content = str_ireplace('[hupso_hide]', '', $content);
|