Hupso Share Buttons for Twitter, Facebook & Google+ - Version 4.6.1

Version Description

  • Compatibility and security improvements
Download this release

Release Info

Developer kasal
Plugin Icon 128x128 Hupso Share Buttons for Twitter, Facebook & Google+
Version 4.6.1
Comparing to
See all releases

Code changes from version 4.6.0 to 4.6.1

Files changed (2) hide show
  1. readme.txt +4 -1
  2. share-buttons-hupso.php +14 -21
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.hupso.com/
4
  Tags: twitter, facebook, google, social sharing, share buttons, social share buttons, share icons, stumbleupon, addthis, sharethis, addtoany, sexybookmarks, pinterest, print, tumblr, bebo, social media, social buttons, social share, email, print button, social plugin, social widget, email button, post, vkontakte, vk.com, reddit, delicous, del.icio.us, linkedin, tumblr, pinterest, stumbleupon, digg, stumble upon, pinterest button, tweet, like, share, sharing, shortcode, button, page, amp
5
  Requires at least: 2.9
6
  Tested up to: 5.4
7
- Stable tag: 4.6.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -307,6 +307,9 @@ Please send bug reports and suggestion using [this feedback form](http://www.hup
307
 
308
  == Changelog ==
309
 
 
 
 
310
  = 4.6.0 =
311
  * Plugin name changed to "Hupso Social Media Share Buttons"
312
 
4
  Tags: twitter, facebook, google, social sharing, share buttons, social share buttons, share icons, stumbleupon, addthis, sharethis, addtoany, sexybookmarks, pinterest, print, tumblr, bebo, social media, social buttons, social share, email, print button, social plugin, social widget, email button, post, vkontakte, vk.com, reddit, delicous, del.icio.us, linkedin, tumblr, pinterest, stumbleupon, digg, stumble upon, pinterest button, tweet, like, share, sharing, shortcode, button, page, amp
5
  Requires at least: 2.9
6
  Tested up to: 5.4
7
+ Stable tag: 4.6.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
307
 
308
  == Changelog ==
309
 
310
+ = 4.6.1 =
311
+ * Compatibility and security improvements
312
+
313
  = 4.6.0 =
314
  * Plugin name changed to "Hupso Social Media Share Buttons"
315
 
share-buttons-hupso.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Hupso Social Media Share Buttons
4
  Plugin URI: http://www.hupso.com/share/
5
  Description: Add simple social share 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: 4.6.0
7
  Author: kasal
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -12,14 +12,13 @@ Domain Path: /languages
12
  */
13
 
14
  global $HUPSO_VERSION;
15
- $HUPSO_VERSION = '4.6.0';
16
 
17
  $hupso_dev = '';
18
  $hupso_state = 'normal';
19
  $HUPSO_SHOW = true;
20
 
21
- $hupso_plugin_url = plugins_url() . '/hupso-share-buttons-for-twitter-facebook-google';
22
-
23
 
24
  /* Check if SSL is used */
25
  if ( is_ssl() ) {
@@ -32,20 +31,6 @@ else {
32
  $hupso_p = 'http:';
33
  }
34
 
35
- if ( ! function_exists( 'is_ssl' ) ) {
36
- function is_ssl() {
37
- if ( isset($_SERVER['HTTPS']) ) {
38
- if ( 'on' == strtolower($_SERVER['HTTPS']) )
39
- return true;
40
- if ( '1' == $_SERVER['HTTPS'] )
41
- return true;
42
- }
43
- elseif ( isset($_SERVER['SERVER_PORT']) && ( '443' == $_SERVER['SERVER_PORT'] ) ) {
44
- return true;
45
- }
46
- return false;
47
- }
48
- }
49
 
50
  add_filter( 'the_content', 'hupso_the_content_normal', 10 );
51
  add_filter( 'get_the_excerpt', 'hupso_get_the_excerpt', 1);
@@ -1002,7 +987,7 @@ function hupso_admin_settings_show() {
1002
  case 'local': $hupso_custom_icons_local_checked = $checked; break;
1003
  case 'custom': $hupso_custom_icons_custom_checked = $checked; break;
1004
  }
1005
- $image_url = plugins_url('/hupso-share-buttons-for-twitter-facebook-google/img/services/');
1006
  ?>
1007
  <input type="radio" name="hupso_custom_icons" onclick="hupso_create_code()" onchange="hupso_create_code()" value="no" <?php echo $hupso_custom_icons_no_checked; ?>/> <?php _e('No. [Default. Do not change this unless you know what you are doing.]', 'hupso'); ?><br/>
1008
  <input type="radio" name="hupso_custom_icons" onclick="hupso_create_code()" onchange="hupso_create_code()" value="local" <?php echo $hupso_custom_icons_local_checked; ?>/> <?php _e('Yes, serve images from local Wordpress folder. ', 'hupso'); ?>
@@ -1037,6 +1022,7 @@ function hupso_admin_settings_show() {
1037
  $token = md5(microtime()) . rand();
1038
  $_SESSION['h_settings_token'] = $token;
1039
  echo '<input type="hidden" name="h_settings_token" value="' . esc_attr($token) . '">';
 
1040
  ?>
1041
  <br/><br/><input class="button-primary" name="submit" type="submit" onclick="hupso_create_code()" value="<?php _e('Save Settings', 'hupso'); ?>" />
1042
  </form>
@@ -1052,8 +1038,15 @@ function hupso_admin_settings_show() {
1052
 
1053
  function hupso_admin_settings_save() {
1054
  if ( !current_user_can( 'manage_options' ) ) {
1055
- wp_die( __( 'You do not have sufficient permissions to access this page.' , 'hupso') );
1056
- }
 
 
 
 
 
 
 
1057
 
1058
  global $hupso_all_services, $hupso_default_services, $hupso_plugin_url;
1059
  update_option( 'hupso_custom', '1' );
3
  Plugin Name: Hupso Social Media Share Buttons
4
  Plugin URI: http://www.hupso.com/share/
5
  Description: Add simple social share 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: 4.6.1
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 = '4.6.1';
16
 
17
  $hupso_dev = '';
18
  $hupso_state = 'normal';
19
  $HUPSO_SHOW = true;
20
 
21
+ $hupso_plugin_url = plugins_url('', __FILE__);
 
22
 
23
  /* Check if SSL is used */
24
  if ( is_ssl() ) {
31
  $hupso_p = 'http:';
32
  }
33
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
 
35
  add_filter( 'the_content', 'hupso_the_content_normal', 10 );
36
  add_filter( 'get_the_excerpt', 'hupso_get_the_excerpt', 1);
987
  case 'local': $hupso_custom_icons_local_checked = $checked; break;
988
  case 'custom': $hupso_custom_icons_custom_checked = $checked; break;
989
  }
990
+ $image_url = plugins_url('/img/services/', __FILE__ );
991
  ?>
992
  <input type="radio" name="hupso_custom_icons" onclick="hupso_create_code()" onchange="hupso_create_code()" value="no" <?php echo $hupso_custom_icons_no_checked; ?>/> <?php _e('No. [Default. Do not change this unless you know what you are doing.]', 'hupso'); ?><br/>
993
  <input type="radio" name="hupso_custom_icons" onclick="hupso_create_code()" onchange="hupso_create_code()" value="local" <?php echo $hupso_custom_icons_local_checked; ?>/> <?php _e('Yes, serve images from local Wordpress folder. ', 'hupso'); ?>
1022
  $token = md5(microtime()) . rand();
1023
  $_SESSION['h_settings_token'] = $token;
1024
  echo '<input type="hidden" name="h_settings_token" value="' . esc_attr($token) . '">';
1025
+ echo wp_nonce_field( 'hupso_save', 'hupso_save_nonce' );
1026
  ?>
1027
  <br/><br/><input class="button-primary" name="submit" type="submit" onclick="hupso_create_code()" value="<?php _e('Save Settings', 'hupso'); ?>" />
1028
  </form>
1038
 
1039
  function hupso_admin_settings_save() {
1040
  if ( !current_user_can( 'manage_options' ) ) {
1041
+ wp_die( __( 'You do not have sufficient permissions to access this page.' , 'hupso') );
1042
+ }
1043
+
1044
+ if (
1045
+ ! isset( $_POST['hupso_save_nonce'] )
1046
+ || ! wp_verify_nonce( $_POST['hupso_save_nonce'], 'hupso_save' )
1047
+ ) {
1048
+ wp_die( __( 'Sorry, your nonce did not verify.' , 'hupso') );
1049
+ }
1050
 
1051
  global $hupso_all_services, $hupso_default_services, $hupso_plugin_url;
1052
  update_option( 'hupso_custom', '1' );