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

Version Description

  • Share buttons can now be enabled/disabled for each post or page individually (inside Edit Post screen). You need to enable this in plugin settings first.
Download this release

Release Info

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

Code changes from version 3.9.14 to 3.9.15

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
5
  Requires at least: 2.8
6
- Tested up to: 3.5.1
7
- Stable tag: 3.9.14
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -43,6 +43,7 @@ These services are used by millions of people every day, so sharing your content
43
  * Email button
44
  * Print button
45
  * All share buttons are optional: You can add or remove any button from plugin settings
 
46
 
47
  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.
48
  Buttons will appear below your articles or on top of them (or both) as you choose.
@@ -133,6 +134,7 @@ This usually happens when you have `overflow:hidden` in your main class for post
133
  `.post {
134
  overflow:hidden;
135
  }`
 
136
  Find it and replace it with:
137
  `.post {
138
  overflow:visible;
@@ -216,6 +218,10 @@ Yes, you can. Go to plugin settings. Change "Use custom social share icons" to "
216
 
217
  Add Hupso share buttons widget, then go to Hupso plugin settings and clear all fields in "Show buttons on" section.
218
 
 
 
 
 
219
  = Can I set share buttons in such a way that it counts the entire site instead of just that specific page? =
220
 
221
  Yes, you can. Enter your website root under "Custom url" in Settings. After that counters will show sharing stats for your whole website, not for each page individually.
@@ -265,6 +271,9 @@ Please send bug reports and suggestion using [this feedback form](http://www.hup
265
 
266
  == Changelog ==
267
 
 
 
 
268
  = 3.9.14 =
269
  * Color picker now supports touch devices
270
  * Fixed some strict PHP warnings
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, facebook like, social, widget, social media, multisite, multi-site, social icons, reddit, stumble upon, delicious, pinterest, bebo, digg, linkedin, email, print, social toolbar
5
  Requires at least: 2.8
6
+ Tested up to: 3.6
7
+ Stable tag: 3.9.15
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
43
  * Email button
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.
134
  `.post {
135
  overflow:hidden;
136
  }`
137
+
138
  Find it and replace it with:
139
  `.post {
140
  overflow:visible;
218
 
219
  Add Hupso share buttons widget, then go to Hupso plugin settings and clear all fields in "Show buttons on" section.
220
 
221
+ = Why is Facebook icon missing when using counters? =
222
+
223
+ It is missing if your site is running from localhost. It will work when you move website to actual domain.
224
+
225
  = Can I set share buttons in such a way that it counts the entire site instead of just that specific page? =
226
 
227
  Yes, you can. Enter your website root under "Custom url" in Settings. After that counters will show sharing stats for your whole website, not for each page individually.
271
 
272
  == Changelog ==
273
 
274
+ = 3.9.15 =
275
+ * Share buttons can now be enabled/disabled for each post or page individually (inside Edit Post screen). You need to enable this in plugin settings first.
276
+
277
  = 3.9.14 =
278
  * Color picker now supports touch devices
279
  * Fixed some strict PHP warnings
share-buttons-hupso-meta.php ADDED
@@ -0,0 +1,117 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /* Define the custom meta box for Edit Post/Edit Page screen */
3
+
4
+ global $wp_version;
5
+
6
+ if ( version_compare($wp_version, '3.0', '<' ) ) {
7
+ // backwards compatible (before WP 3.0)
8
+ add_action( 'admin_init', 'hupso_add_custom_box', 1 );
9
+ }
10
+ else {
11
+ add_action( 'add_meta_boxes', 'hupso_add_custom_box' );
12
+ }
13
+
14
+
15
+ // Add Hupso for 'posts' and 'pages'
16
+ add_filter('manage_posts_columns', 'hupso_manage_posts_columns', 10, 2);
17
+ add_filter('manage_pages_columns', 'hupso_manage_posts_columns', 10, 2);
18
+ function hupso_manage_posts_columns($posts_columns, $post_type)
19
+ {
20
+ $posts_columns['hupso'] = __('Hupso');
21
+ return $posts_columns;
22
+ }
23
+
24
+
25
+ add_action( 'manage_posts_custom_column' , 'hupso_manage_posts_custom_column', 10, 2 );
26
+ add_action( 'manage_pages_custom_column' , 'hupso_manage_posts_custom_column', 10, 2 );
27
+
28
+ function hupso_manage_posts_custom_column( $column, $post_id ) {
29
+ global $post;
30
+ if ( $column == 'hupso' ) {
31
+ $value = get_post_meta( $post->ID, 'hupso-share-buttons', true );
32
+ if ($value == '') {
33
+ $value = __('default');
34
+ }
35
+ echo ucfirst($value);
36
+ }
37
+ }
38
+
39
+
40
+ /* Do something with the data entered */
41
+ add_action( 'save_post', 'hupso_save_post' );
42
+
43
+ /* Adds a box to the main column on the Post and Page edit screens */
44
+ function hupso_add_custom_box() {
45
+ $screens = array( 'post', 'page' );
46
+ foreach ($screens as $screen) {
47
+ add_meta_box(
48
+ '',
49
+ 'Hupso Share Buttons',
50
+ 'hupso_inner_custom_box',
51
+ $screen,
52
+ 'side'
53
+ );
54
+ }
55
+ }
56
+
57
+ /* Prints the box content */
58
+ function hupso_inner_custom_box( $post ) {
59
+
60
+ // Use nonce for verification
61
+ wp_nonce_field( plugin_basename( __FILE__ ), 'hupso_noncename' );
62
+
63
+ // The actual fields for data entry
64
+ // Use get_post_meta to retrieve an existing value from the database and use the value for the form
65
+ $value = get_post_meta( $post->ID, 'hupso-share-buttons', true );
66
+ $checked = ' checked="checked" ';
67
+ $def = '';
68
+ $ena = '';
69
+ $dis = '';
70
+ switch ($value) {
71
+ case '':
72
+ $def = $checked;
73
+ break;
74
+ case 'enabled':
75
+ $ena = $checked;
76
+ break;
77
+ case 'disabled':
78
+ $dis = $checked;
79
+ break;
80
+ default:
81
+ $def = $checked;
82
+ }
83
+ echo '<input type="radio" name="hupso-share-buttons" value="default" ' . $def . '> ' . __('Default', 'hupso') . ' (<a href="options-general.php?page=hupso-share-buttons-for-twitter-facebook-google/share-buttons-hupso.php">' . __('Settings', 'hupso') . '</a>)<br>';
84
+ echo '<input type="radio" name="hupso-share-buttons" value="enabled" ' . $ena . '> ' . __('Enabled', 'hupso') . '<br>';
85
+ echo '<input type="radio" name="hupso-share-buttons" value="disabled" ' . $dis . '> ' . __('Disabled', 'hupso') . '<br>';
86
+ }
87
+
88
+ /* When the post is saved, saves our custom data */
89
+ function hupso_save_post( $post_id ) {
90
+
91
+ global $post;
92
+
93
+ // First we need to check if the current user is authorised to do this action.
94
+ if ( isset($_REQUEST['post_type']) && 'page' == $_REQUEST['post_type'] ) {
95
+ if ( ! current_user_can( 'edit_page', $post_id ) )
96
+ return;
97
+ } else {
98
+ if ( ! current_user_can( 'edit_post', $post_id ) )
99
+ return;
100
+ }
101
+
102
+ // Secondly we need to check if the user intended to change this value.
103
+ if ( ! isset( $_POST['hupso_noncename'] ) || ! wp_verify_nonce( $_POST['hupso_noncename'], plugin_basename( __FILE__ ) ) )
104
+ return;
105
+
106
+ // Thirdly we can save the value to the database
107
+ // sanitize user input
108
+ $mydata = sanitize_text_field( $_POST['hupso-share-buttons'] );
109
+ $value = get_post_meta( $post->ID, 'hupso-share-buttons', true );
110
+ if ($mydata != 'default') {
111
+ update_post_meta( $post->ID, 'hupso-share-buttons', $mydata);
112
+ }
113
+ else {
114
+ delete_post_meta( $post->ID, 'hupso-share-buttons');
115
+ }
116
+ }
117
+ ?>
share-buttons-hupso-widget.php CHANGED
@@ -12,7 +12,7 @@ class Hupso_Widget extends WP_Widget {
12
  parent::__construct(
13
  'hupso_widget', // Base ID
14
  'Hupso Share Buttons Widget', // Name
15
- array( 'description' => __( 'Help visitors share your posts on the most popular social networks: Twitter, Facebook, Google Plus, Linkedin, StumbleUpon, Digg, Reddit and others', 'share_buttons_hupso' ), ) // Args
16
  );
17
  }
18
 
@@ -65,7 +65,7 @@ class Hupso_Widget extends WP_Widget {
65
  $title = $instance[ 'title' ];
66
  }
67
  else {
68
- $title = __( 'Share', 'share_buttons_hupso' );
69
  }
70
  ?>
71
  <p>
@@ -73,7 +73,7 @@ class Hupso_Widget extends WP_Widget {
73
  <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" />
74
  </p>
75
  <p>
76
- <a href="options-general.php?page=hupso-share-buttons-for-twitter-facebook-google/share-buttons-hupso.php"><?php _e('Settings', 'share_buttons_hupso');?></a>
77
  </p>
78
  <?php
79
  }
12
  parent::__construct(
13
  'hupso_widget', // Base ID
14
  'Hupso Share Buttons Widget', // Name
15
+ array( 'description' => __( 'Help visitors share your posts on the most popular social networks: Twitter, Facebook, Google Plus, Linkedin, StumbleUpon, Digg, Reddit and others', 'hupso' ), ) // Args
16
  );
17
  }
18
 
65
  $title = $instance[ 'title' ];
66
  }
67
  else {
68
+ $title = __( 'Share', 'hupso' );
69
  }
70
  ?>
71
  <p>
73
  <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" />
74
  </p>
75
  <p>
76
+ <a href="options-general.php?page=hupso-share-buttons-for-twitter-facebook-google/share-buttons-hupso.php"><?php _e('Settings', 'hupso');?></a>
77
  </p>
78
  <?php
79
  }
share-buttons-hupso.php CHANGED
@@ -3,16 +3,16 @@
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, StumbleUpon, Digg, Reddit, Bebo 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.14
7
  Author: kasal
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
- Text Domain: share_buttons_hupso
11
  Domain Path: /languages
12
  */
13
 
14
  global $HUPSO_VERSION;
15
- $HUPSO_VERSION = '3.9.14';
16
 
17
  $hupso_dev = '';
18
  $hupso_state = 'normal';
@@ -51,7 +51,7 @@ add_filter( 'the_content', 'hupso_the_content_normal', 10 );
51
  add_filter( 'get_the_excerpt', 'hupso_get_the_excerpt', 1);
52
  add_filter( 'the_excerpt', 'hupso_the_excerpt', 100 );
53
 
54
- load_plugin_textdomain( 'share_buttons_hupso', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
55
 
56
  if ( is_admin() ) {
57
  add_filter('plugin_action_links', 'hupso_plugin_action_links', 10, 2);
@@ -76,6 +76,11 @@ if ( $hupso_widget_text == '1' ) {
76
  add_filter('widget_text', 'do_shortcode');
77
  }
78
 
 
 
 
 
 
79
 
80
  /* Add stylesheet */
81
  add_action( 'wp_enqueue_scripts', 'hupso_add_my_stylesheet' );
@@ -160,7 +165,8 @@ function hupso_plugin_uninstall() {
160
  delete_option( 'hupso_custom_icons' );
161
  delete_option( 'hupso_image_folder_url' );
162
  delete_option( 'hupso_background_color' );
163
- delete_option( 'hupso_border_color' );
 
164
  }
165
 
166
  function hupso_plugin_activation() {
@@ -250,14 +256,14 @@ function hupso_admin_settings_show() {
250
  );
251
 
252
 
253
- $hupso_lang_code = __('en_US', 'share_buttons_hupso');
254
- $hupso_language = __('English', 'share_buttons_hupso');
255
- $hupso_share_image = __('Share', 'share_buttons_hupso');
256
- $hupso_excerpts = __('Excerpts', 'share_buttons_hupso');
257
- $hupso_feeds = __('Feeds', 'share_buttons_hupso');
258
 
259
  if ( !current_user_can( 'manage_options' ) ) {
260
- wp_die( __( 'You do not have sufficient permissions to access this page.' , 'share_buttons_hupso') );
261
  }
262
 
263
  /* save settings */
@@ -267,18 +273,18 @@ function hupso_admin_settings_show() {
267
 
268
 
269
  echo '<div class="wrap" style="padding-bottom:100px;"><div class="icon32" id="icon-users"></div>';
270
- echo '<h2>'. __('Hupso Share Buttons for Twitter, Facebook & Google+ (Settings)', 'share_buttons_hupso').'</h2>';
271
  echo '<form name="hupso_settings_form" method="post" action="">';
272
 
273
  echo '<div id="right" style="float:right; width:200px; margin-right:10px; margin-left:20px; margin-top:20px;">';
274
- echo '<div id="button_preview" style="background: #F7FFBF; padding: 10px 10px 10px 10px; "><table><tr><td><h3>' . __( 'Preview', 'share_buttons_hupso') . '</h3></td><td style="padding-left:50px;"><input class="button-primary" name="submit-preview" type="button" onclick="hupso_create_code()" value="' . __('Update', 'share_buttons_hupso') . '" /></td></tr></table><br/>';
275
  echo '<div id="button"></div>';
276
  echo '<div id="move_mouse"><p style="font-size:13px; padding-top: 15px;"><b>Move your mouse over the button to see the sharing menu.</b></p></div><br/><br/>';
277
- echo '<div style="padding-left:40px;"><input class="button-primary" name="submit-preview" type="submit" onclick="hupso_create_code()" value="' . __('Save Settings', 'share_buttons_hupso') . '" /></div>';
278
  echo '</div>';
279
 
280
  echo '<div id="tips" style="background: #CCCCFF; padding: 10px 10px 10px 10px; margin-top:30px; ">';
281
- echo '<p><b>' . __('Shortcodes', 'share_buttons_hupso') . '</b></p>';
282
  echo '<p>Use <b>[hupso_hide]</b> anywhere in post\'s text to hide buttons for specific post.</p>';
283
  echo '<p>Use <b>[hupso]</b> anywhere in post\'s text to show buttons for specific post at custom position.</p>';
284
  echo '<p>Use <b>Hupso Share Buttons Widget</b> to show share buttons in sidebar or footer.</p>';
@@ -340,7 +346,7 @@ function hupso_admin_settings_show() {
340
  <div id="button_type">
341
  <table style="border: 0px;">
342
  <tr>
343
- <td style="width:100px;"><?php _e('Button type', 'share_buttons_hupso'); ?>
344
  </td>
345
  <?php
346
  $hupso_button_type = get_option( 'hupso_button_type', 'share_toolbar' );
@@ -368,7 +374,7 @@ function hupso_admin_settings_show() {
368
  <div id="button_style">
369
  <table style="border: 0px;">
370
  <tr>
371
- <td style="width:100px;"><?php _e('Button size', 'share_buttons_hupso'); ?></td>
372
  <td>
373
  <table style="border: 0px;">
374
  <tr><td><input type="radio" name="size" value="button60x14" onclick="hupso_create_code()" onchange="hupso_create_code()" <?php echo $button60_checked; ?> /></td><td style="padding-right:10px;"><?php echo $button_60_img ?></td></tr>
@@ -376,7 +382,7 @@ function hupso_admin_settings_show() {
376
  <tr><td><input type="radio" name="size" value="button100x23" onclick="hupso_create_code()" onchange="hupso_create_code()" <?php echo $button100_checked; ?>/></td><td style="padding-right:10px;"><?php echo $button_100_img ?></td></tr>
377
  <tr><td><input type="radio" name="size" value="button120x28" onclick="hupso_create_code()" onchange="hupso_create_code()" <?php echo $button120_checked; ?>/></td><td style="padding-right:10px;"><?php echo $button_120_img ?></td></tr>
378
  <tr><td><input type="radio" name="size" value="button160x37" onclick="hupso_create_code()" onchange="hupso_create_code()" <?php echo $button160_checked; ?>/></td><td style="padding-right:20px;"><?php echo $button_160_img ?></td></tr>
379
- <tr><td><input type="radio" name="size" value="custom" onclick="hupso_create_code()" onchange="hupso_create_code()" <?php echo $share_button_custom_checked; ?> /></td><td style="padding-left:10px;"><?php _e('Custom image from URL', 'share_buttons_hupso'); ?>: <input type="text" name="hupso_button_image_custom_url" onchange="create_code()" style="width:300px;" value="<?php echo $hupso_button_image_custom_url; ?>"/><br/> See <a href="http://www.hupso.com/share/gallery.php" target="_blank">gallery of custom share buttons</a>.</td></tr> </td></tr>
380
  </table>
381
  <hr style="height:1px; width:500px;"/>
382
  </td>
@@ -387,7 +393,7 @@ function hupso_admin_settings_show() {
387
  <div id="toolbar_size" style="display:none;">
388
  <table style="border: 0px;">
389
  <tr>
390
- <td style="width:100px;"><?php _e('Toolbar size', 'share_buttons_hupso'); ?></td>
391
  <td style="width:100px">
392
  <?php
393
  $hupso_toolbar_size = get_option( 'hupso_toolbar_size', 'medium' );
@@ -402,9 +408,9 @@ function hupso_admin_settings_show() {
402
  default: $hupso_toolbar_size_medium_checked = $checked;
403
  }
404
  ?>
405
- <input type="radio" name="select_toolbar_size" value="big" onclick="hupso_create_code()" onchange="hupso_create_code()" <?php echo $hupso_toolbar_size_big_checked; ?> /> <?php _e( 'Big', 'share_buttons_hupso');?> <br/>
406
- <input type="radio" name="select_toolbar_size" value="medium" onclick="hupso_create_code()" onchange="hupso_create_code()" <?php echo $hupso_toolbar_size_medium_checked; ?> /> <?php _e( 'Medium', 'share_buttons_hupso');?> <br/>
407
- <input type="radio" name="select_toolbar_size" value="small" onclick="hupso_create_code()" onchange="hupso_create_code()" <?php echo $hupso_toolbar_size_small_checked; ?> /> <?php _e( 'Small', 'share_buttons_hupso');?> <br/>
408
  <hr style="height:1px; width:500px;"/>
409
  </td>
410
  </tr>
@@ -415,7 +421,7 @@ function hupso_admin_settings_show() {
415
  <div id="share_image" style="padding-top:10px;">
416
  <table style="border: 0px;">
417
  <tr>
418
- <td style="width:100px;"><?php _e('Share image', 'share_buttons_hupso'); ?></td>
419
  <td style="width:500px">
420
  <?php
421
 
@@ -438,7 +444,7 @@ function hupso_admin_settings_show() {
438
  $hupso_share_image_custom_url = get_option ( 'hupso_share_image_custom_url', '' );
439
 
440
  ?>
441
- <input type="radio" name="hupso_share_image" onclick="hupso_create_code()" onchange="hupso_create_code()" value="show" <?php echo $hupso_share_image_show_checked; ?>/> <?php _e('Show in language', 'share_buttons_hupso');?>:
442
  <select id="share_image_lang" name="share_image_lang" onclick="hupso_create_code()" onchange="hupso_create_code()">
443
  <option value="en" <?php if ( ($hupso_share_image_lang == 'en') || ($hupso_share_image_lang == '') ) echo ' selected ';?>>English</option>
444
  <option value="fr" <?php if ($hupso_share_image_lang == 'fr') echo ' selected ';?>>French</option>
@@ -465,8 +471,8 @@ function hupso_admin_settings_show() {
465
  <option value="cs" <?php if ($hupso_share_image_lang == 'cs') echo ' selected ';?>>Czech</option>
466
  <option value="tr" <?php if ($hupso_share_image_lang == 'tr') echo ' selected ';?>>Turkish</option>
467
  </select><br/>
468
- <input type="radio" name="hupso_share_image" onclick="hupso_create_code()" onchange="hupso_create_code()" value="hide" <?php echo $hupso_share_image_hide_checked; ?>/> <?php _e('Hide', 'share_buttons_hupso'); ?><br/>
469
- <input type="radio" name="hupso_share_image" onclick="hupso_create_code()" onchange="hupso_create_code()" value="custom" <?php echo $hupso_share_image_custom_checked; ?>/> <?php _e('Custom image from URL', 'share_buttons_hupso'); ?>: <input name="hupso_share_image_custom_url" type="text" onmouseout="hupso_create_code()" onchange="hupso_create_code()" value="<?php echo $hupso_share_image_custom_url;?>" size="50" /><br/><span style="padding-left:30px; font-size:10px;">(<?php _e('Optimal image height: 32px - big, 24px - medium, 16px - small/counters', 'share_buttons_hupso'); ?>)</span><br/>
470
  <hr style="height:1px; width:500px;"/>
471
  </td>
472
  </tr>
@@ -490,7 +496,7 @@ function hupso_admin_settings_show() {
490
  <div id="services">
491
  <table style="border: 0px;">
492
  <tr>
493
- <td style="width:100px;"><?php _e('Social networks', 'share_buttons_hupso'); ?></td>
494
  <td><?php hupso_settings_print_services(); ?></td>
495
  </tr>
496
  </table>
@@ -533,7 +539,7 @@ function hupso_admin_settings_show() {
533
  <div id="counters_config" style="display:none;">
534
  <table style="border: 0px;">
535
  <tr>
536
- <td style="width:100px;"><?php _e('Social networks', 'share_buttons_hupso'); ?></td>
537
  <td>
538
  <table>
539
  <tr>
@@ -579,12 +585,12 @@ function hupso_admin_settings_show() {
579
  </tr>
580
  <tr>
581
  <td style="padding-top:70px;">&nbsp;</td>
582
- <td><? _e('Show counters in language', 'share_buttons_hupso');?>:
583
  <select id="hupso_counters_lang" name="hupso_counters_lang" onchange="hupso_create_code()" onclick="hupso_create_code()">
584
  <?php hupso_counters_lang_list(); ?>
585
  </select><br/><br/>
586
- (<?php _e('Language changes will not show in preview', 'share_buttons_hupso');?>)
587
- </td><td><?php _e('Select which language to use for Counters (Tweet, Facebook Like, Facebook Share...)', 'share_buttons_hupso');?>. <?php _e('Some social networks support more languages than others, so some buttons might get translated, while some might stay in English', 'share_buttons_hupso');?>.</td>
588
  </tr>
589
  </table>
590
 
@@ -596,7 +602,7 @@ function hupso_admin_settings_show() {
596
  <div id="show_icons">
597
  <table style="border: 0px;">
598
  <tr>
599
- <td style="width:100px;"><?php _e('Type of menu', 'share_buttons_hupso'); ?></td>
600
  <?php
601
  $menu_type = get_option( 'hupso_menu_type', 'labels' );
602
  $checked = ' checked="checked" ';
@@ -609,15 +615,15 @@ function hupso_admin_settings_show() {
609
  }
610
 
611
  ?>
612
- <td><hr style="height:1px; width:500px;"/><input type="radio" name="menu_type" value="labels" onclick="hupso_create_code()" <?php echo $hupso_labels_checked; ?> /> <?php _e('Show icons and service names', 'share_buttons_hupso'); ?><br/>
613
- <input type="radio" name="menu_type" value="icons" onclick="hupso_create_code()" <?php echo $hupso_icons_checked; ?> /> <?php _e('Show icons only', 'share_buttons_hupso'); ?><br/></td>
614
  </tr>
615
  </table>
616
  </div>
617
 
618
  <table style="border: 0px;">
619
  <tr>
620
- <td style="width:100px;"><?php _e('Button position', 'share_buttons_hupso'); ?></td>
621
  <?php
622
  $button_position = get_option( 'hupso_button_position', 'below' );
623
  $checked = ' checked="checked" ';
@@ -632,12 +638,12 @@ function hupso_admin_settings_show() {
632
  }
633
  ?>
634
  <td><hr style="height:1px; width:500px;" align="left"/>
635
- <input type="radio" name="hupso_button_position" value="above" <?php echo $hupso_above_checked; ?> /> <?php _e('Above the post', 'share_buttons_hupso'); ?><br/>
636
- <input type="radio" name="hupso_button_position" value="below" <?php echo $hupso_below_checked; ?> /> <?php _e('Below the post', 'share_buttons_hupso'); ?><br/>
637
- <input type="radio" name="hupso_button_position" value="both" <?php echo $hupso_both_checked; ?> /> <?php _e('Above and below the post', 'share_buttons_hupso'); ?><br/></td>
638
  </tr>
639
  <tr>
640
- <td style="width:100px;"><?php _e('Show buttons on', 'share_buttons_hupso'); ?></td>
641
  <td><hr style="height:1px; width:500px;" align="left"/>
642
  <?php
643
  $checked = ' checked="checked" ';
@@ -696,22 +702,29 @@ function hupso_admin_settings_show() {
696
  else
697
  $hupso_password_protected_checked = '';
698
 
699
-
700
-
701
  ?>
702
- <input type="checkbox" name="hupso_show_posts" value="1" <?php echo $hupso_show_posts_checked; ?> /> <?php _e('Posts', 'share_buttons_hupso'); ?><br/>
703
- <input type="checkbox" name="hupso_show_pages" value="1" <?php echo $hupso_show_pages_checked; ?> /> <?php _e('Pages', 'share_buttons_hupso'); ?><br/>
704
- <input type="checkbox" name="hupso_show_frontpage" value="1" <?php echo $hupso_show_frontpage_checked; ?> /> <?php _e('Front page', 'share_buttons_hupso'); ?><br/>
705
- <input type="checkbox" name="hupso_show_category" value="1" <?php echo $hupso_show_category_checked; ?> /> <?php _e('Archive pages (categories, tags, dates, authors)', 'share_buttons_hupso'); ?><br/>
706
- <input type="checkbox" name="hupso_show_excerpts" value="1" <?php echo $hupso_show_excerpts_checked; ?> /> <?php _e('Excerpts', 'share_buttons_hupso'); ?><br/>
707
- <input type="checkbox" name="hupso_show_search" value="1" <?php echo $hupso_show_search_checked; ?> /> <?php _e('Search pages', 'share_buttons_hupso'); ?><br/>
708
- <input type="checkbox" name="hupso_password_protected" value="1" <?php echo $hupso_password_protected_checked; ?> /> <?php _e('Password protected posts', 'share_buttons_hupso'); ?><br/>
709
-
 
 
 
 
 
 
 
 
 
710
  </td>
711
  </tr>
712
  <tr>
713
- <td style="width:100px;"><?php _e('Hide buttons for specific categories', 'share_buttons_hupso'); ?></td>
714
- <td><hr style="height:1px; width:500px;" align="left"/>
715
  <?php
716
  /* hidden categories */
717
  $hupso_hide_categories = get_option( 'hupso_hide_categories', array() );
@@ -731,16 +744,16 @@ function hupso_admin_settings_show() {
731
  echo $option;
732
  }
733
  ?>
734
- <option value="hupso-option-always_show">--- <?php _e('Always show', 'share_buttons_hupso');?> ---</option>
735
- </select>
736
- <p><?php _e('Select categories where you want to hide share buttons.', 'share_buttons_hupso'); ?><br>
737
- <?php _e('To select multiple categories, you need to hold down the Control Key for each selected category after the first one.', 'share_buttons_hupso');?><br />
738
- <?php _e('Leave all options unselected or select just the last option to show buttons inside every category.', 'share_buttons_hupso');?>
739
- </p>
740
  </td>
741
  </tr>
742
  <tr>
743
- <td style="width:100px;"><?php _e('Get share text from', 'share_buttons_hupso'); ?></td>
744
  <td><hr style="height:1px; width:500px;" align="left"/>
745
  <?php
746
  $checked = ' checked="checked" ';
@@ -754,13 +767,13 @@ function hupso_admin_settings_show() {
754
  else
755
  $hupso_title_text_post_checked = $checked;
756
  ?>
757
- <input type="radio" name="hupso_title_text" value="post" <?php echo $hupso_title_text_post_checked; ?> /> <?php _e('Title of post in Wordpress', 'share_buttons_hupso'); ?><br/>
758
- <input type="radio" name="hupso_title_text" value="page" <?php echo $hupso_title_text_page_checked; ?> /> <?php _e('Title of current web page', 'share_buttons_hupso'); ?>
759
  </td>
760
  </tr>
761
 
762
  <tr>
763
- <td style="width:100px;"><?php _e('Twitter via', 'share_buttons_hupso'); ?></td>
764
  <td><hr style="height:1px; width:500px;" align="left"/>
765
  <?php
766
 
@@ -768,12 +781,12 @@ function hupso_admin_settings_show() {
768
  $hupso_twitter_via = get_option( 'hupso_twitter_via', '' );
769
 
770
  ?>
771
- @<input type="text" name="hupso_twitter_via" onclick="hupso_create_code()" onchange="hupso_create_code()" onmouseout="hupso_create_code()" size="30" value="<?php echo $hupso_twitter_via; ?>" /> <span style="padding-left:30px;"><?php _e('Add "via @yourprofile" to tweets', 'share_buttons_hupso', 'share_buttons_hupso');?>.</span><br/>
772
  </td>
773
  </tr>
774
 
775
  <tr>
776
- <td style="width:100px;"><?php _e('Image for Facebook thumbnail', 'share_buttons_hupso'); ?></td>
777
  <td><hr style="height:1px; width:500px;" align="left"/>
778
  <?php
779
 
@@ -813,18 +826,18 @@ function hupso_admin_settings_show() {
813
  $header_image = trim(get_header_image());
814
 
815
  ?>
816
- <span style="font-size:10px"><?php _e('All images for Facebook should be at least 200px in both dimensions (Facebook limitation)', 'share_buttons_hupso');?>.<br/><?php _e('After you change settings here, please wait 24 hours (or more) for Facebook to fetch new thumbnails', 'share_buttons_hupso');?>.<br/><?php _e('"og:image" meta tag with image url will be added to head of HTML. Select "None" to disable this feature', 'share_buttons_hupso');?>.<br/></span><br/>
817
 
818
- <input type="radio" name="hupso_facebook_image" onclick="hupso_create_code()" onchange="hupso_create_code()" value="header" <?php echo $hupso_facebook_image_header_checked; ?>/> <?php _e('Header image', 'share_buttons_hupso'); ?> <?php if ( $header_image != '' ) { echo '(<a href="' . $header_image . '" title="' . __( 'Click here to see full header image', 'share_buttons_hupso' ) . '" target="_blank">' . __( 'preview', 'share_buttons_hupso' ) . '</a>)'; } ?><br/>
819
- <input type="radio" name="hupso_facebook_image" onclick="hupso_create_code()" onchange="hupso_create_code()" value="featured" <?php echo $hupso_facebook_image_featured_checked; ?>/> <?php _e('Featured image of post', 'share_buttons_hupso'); ?><br/>
820
- <input type="radio" name="hupso_facebook_image" onclick="hupso_create_code()" onchange="hupso_create_code()" value="custom" <?php echo $hupso_facebook_image_custom_checked; ?>/> <?php _e('Custom image from URL', 'share_buttons_hupso'); ?>: <input type="text" name="hupso_facebook_custom_image" onclick="hupso_create_code()" onchange="hupso_create_code()" onmouseout="hupso_create_code()" size="50" value="<?php echo $hupso_facebook_custom_image; ?>" /><br/>
821
- <input type="radio" name="hupso_facebook_image" onclick="hupso_create_code()" onchange="hupso_create_code()" value="none" <?php echo $hupso_facebook_image_none_checked; ?>/> <?php _e('None', 'share_buttons_hupso'); ?><br/>
822
- <input type="radio" name="hupso_facebook_image" onclick="hupso_create_code()" onchange="hupso_create_code()" value="fch" <?php echo $hupso_facebook_image_fch_checked; ?>/> <?php _e('FCH - use Featured image of post (if available), then use Custom image (if available), then use Header image (if available)', 'share_buttons_hupso'); ?><br/>
823
  </td>
824
  </tr>
825
 
826
  <tr>
827
- <td style="width:100px;"><?php _e('CSS style', 'share_buttons_hupso'); ?></td>
828
  <td><hr style="height:1px; width:400px;" align="left"/>
829
  <?php
830
 
@@ -832,12 +845,12 @@ function hupso_admin_settings_show() {
832
  $hupso_css_style = get_option( 'hupso_css_style', 'padding-bottom:20px; padding-top:10px;');
833
 
834
  ?>
835
- <input type="text" name="hupso_css_style" style="width:400px;" value="<?php echo $hupso_css_style;?>" /><br/><span><?php _e('Use CSS to style share buttons. For example: you can increase padding to have more free space above or below the buttons', 'share_buttons_hupso');?>.</span><br/>
836
  </td>
837
  </tr>
838
 
839
  <tr>
840
- <td style="width:100px;"><?php _e('Widget Text', 'share_buttons_hupso'); ?></td>
841
  <td><hr style="height:1px; width:400px;" align="left"/>
842
  <?php
843
 
@@ -850,12 +863,12 @@ function hupso_admin_settings_show() {
850
  $hupso_widget_text_checked = '';
851
 
852
  ?>
853
- <input type="checkbox" name="hupso_widget_text" value="1" <?php echo $hupso_widget_text_checked; ?> /> <?php _e('Use shortcodes in text widgets', 'share_buttons_hupso'); ?><br/><?php _e('If this is checked, you can use [hupso] shortcode inside text widgets and it will be replaced by share buttons', 'share_buttons_hupso'); ?>.
854
  </td>
855
  </tr>
856
 
857
  <tr>
858
- <td style="width:100px;"><?php _e('Custom title', 'share_buttons_hupso'); ?></td>
859
  <td><hr style="height:1px; width:400px;" align="left"/>
860
  <?php
861
  /* page_title */
@@ -863,24 +876,24 @@ function hupso_admin_settings_show() {
863
  $hupso_page_title = stripslashes(get_option( 'hupso_page_title', ''));
864
  $hupso_page_title = htmlentities($hupso_page_title);
865
  ?>
866
- <input type="text" name="page_title" value="<?php echo $hupso_page_title;?>" onchange="hupso_create_code()" onmouseout="hupso_create_code()" size="50" /><br/><?php _e('Enter custom text that will always be used for sharing.', 'share_buttons_hupso'); ?><br/><?php _e('Leave this blank to use title of current page as text for sharing. [Default]', 'share_buttons_hupso'); ?>
867
  </td>
868
  </tr>
869
 
870
  <tr>
871
- <td style="width:100px;"><?php _e('Custom url', 'share_buttons_hupso'); ?></td>
872
  <td><hr style="height:1px; width:400px;" align="left"/>
873
  <?php
874
  /* page_url */
875
  $checked = ' checked="checked" ';
876
  $hupso_page_url = get_option( 'hupso_page_url', '');
877
  ?>
878
- <input type="text" name="page_url" value="<?php echo $hupso_page_url;?>" onchange="hupso_create_code()" onmouseout="hupso_create_code()" size="50" /><br/><?php _e('Enter custom url that will always be used for sharing. You can enter your root website here (e.g.: http://www.example.com or http://example.blogspot.com, so counters will show statistics for your whole website, not for each page individually.', 'share_buttons_hupso'); ?><br/><?php _e('Leave this blank to use url of current page for sharing. [Default]', 'share_buttons_hupso'); ?>
879
  </td>
880
  </tr>
881
 
882
  <tr>
883
- <td style="width:100px;"><?php _e('Use custom social share icons', 'share_buttons_hupso'); ?></div></td>
884
  <td><hr style="height:1px; width:400px;" align="left"/>
885
  <?php
886
  /* image_folder_url */
@@ -897,17 +910,17 @@ function hupso_admin_settings_show() {
897
  }
898
  $image_url = plugins_url('/hupso-share-buttons-for-twitter-facebook-google/img/services/');
899
  ?>
900
- <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.]', 'share_buttons_hupso'); ?><br/>
901
- <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. ', 'share_buttons_hupso'); ?>
902
  [<?php echo $image_url;?>]<br/>
903
- <input type="radio" name="hupso_custom_icons" onclick="hupso_create_code()" onchange="hupso_create_code()" value="custom" <?php echo $hupso_custom_icons_custom_checked; ?>/> <?php _e('Yes, serve images from remote URL: ', 'share_buttons_hupso'); ?><br/>
904
- <input type="text" name="hupso_image_folder_url" value="<?php echo $hupso_image_folder_url;?>" onchange="hupso_create_code()" onmouseout="hupso_create_code()" size="50" /><br/><input type="hidden" name="hupso_image_folder_local" value="<?php echo $image_url;?>" /><?php _e('Enter URL to folder with custom social images. Include "/" at the end of the URL. If you would like to use custom icons, make sure you <a href="http://www.hupso.com/share/custom-social-icons.php" target="_blank">read instructions</a>.', 'share_buttons_hupso'); ?><br/><?php _e('This setting has no effect when using Counters.', 'share_buttons_hupso'); ?>
905
  </td>
906
  </tr>
907
  </div>
908
 
909
  </table>
910
- <br/><br/><input class="button-primary" name="submit" type="submit" onclick="hupso_create_code()" value="<?php _e('Save Settings', 'share_buttons_hupso'); ?>" />
911
  </form>
912
  </div>
913
 
@@ -1164,6 +1177,14 @@ function hupso_admin_settings_save() {
1164
  update_option( 'hupso_share_buttons_code', $code );
1165
  }
1166
 
 
 
 
 
 
 
 
 
1167
  }
1168
 
1169
 
@@ -1194,26 +1215,47 @@ function hupso_the_excerpt( $content ) {
1194
 
1195
  function hupso_the_content( $content ) {
1196
 
1197
- global $hupso_plugin_url, $wp_version, $hupso_dev, $hupso_state, $HUPSO_SHOW, $hupso_p;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1198
 
1199
  if ($HUPSO_SHOW == false) {
1200
  $content = str_ireplace('[hupso_hide]', '', $content);
1201
  $content = str_ireplace('[hupso]', '', $content);
1202
- return $content;
 
1203
  }
1204
 
1205
  /* Do now show share buttons when [hupso_hide] is used */
1206
  if ( ($hupso_state == 'normal') && ( stripos($content, '[hupso_hide]') !== false ) ) {
1207
  $content = str_ireplace('[hupso_hide]', '', $content);
1208
  $content = str_ireplace('[hupso]', '', $content);
1209
- return $content;
 
1210
  }
1211
 
1212
  /* Do not show share buttons in feeds */
1213
  if ( ($hupso_state == 'normal') && (is_feed()) ) {
1214
  $content = str_ireplace('[hupso_hide]', '', $content);
1215
  $content = str_ireplace('[hupso]', '', $content);
1216
- return $content;
 
1217
  }
1218
 
1219
  /* Do not show share buttons on password protected pages, but show it inside widget */
@@ -1222,11 +1264,13 @@ function hupso_the_content( $content ) {
1222
  if ( $hupso_state == 'normal' ) {
1223
  if ($pass != '') {
1224
  if (!$hupso_password_protected) {
1225
- return $content;
 
1226
  }
1227
  else {
1228
  if (post_password_required()) {
1229
- return $content;
 
1230
  }
1231
  }
1232
  }
@@ -1236,21 +1280,26 @@ function hupso_the_content( $content ) {
1236
  if ( ($hupso_state == 'normal') && (is_search()) && ($hupso_show_search != 1) ) {
1237
  $content = str_ireplace('[hupso_hide]', '', $content);
1238
  $content = str_ireplace('[hupso]', '', $content);
1239
- return $content;
 
1240
  }
1241
 
1242
  $hupso_show_posts = get_option( 'hupso_show_posts' , '1' );
1243
  if ( ($hupso_state == 'normal') && (is_single()) && ($hupso_show_posts != 1) ) {
1244
  $content = str_ireplace('[hupso_hide]', '', $content);
1245
  $content = str_ireplace('[hupso]', '', $content);
1246
- return $content;
 
 
1247
  }
1248
 
1249
  $hupso_show_pages = get_option( 'hupso_show_pages' , '1' );
1250
  if ( ($hupso_state == 'normal') && (is_page()) && ($hupso_show_pages != 1) ) {
1251
  $content = str_ireplace('[hupso_hide]', '', $content);
1252
  $content = str_ireplace('[hupso]', '', $content);
1253
- return $content;
 
 
1254
  }
1255
 
1256
  $hupso_show_frontpage = get_option( 'hupso_show_frontpage' , '1' );
@@ -1260,13 +1309,17 @@ function hupso_the_content( $content ) {
1260
  if ( ($hupso_state == 'normal') && (is_home()) && ($hupso_show_frontpage != 1) ) {
1261
  $content = str_ireplace('[hupso_hide]', '', $content);
1262
  $content = str_ireplace('[hupso]', '', $content);
1263
- return $content;
 
 
1264
  }
1265
  /* Do not show share buttons if option is disabled */
1266
  if ( ($hupso_state == 'normal') && (is_archive()) && ($hupso_show_category != 1) ) {
1267
  $content = str_ireplace('[hupso_hide]', '', $content);
1268
  $content = str_ireplace('[hupso]', '', $content);
1269
- return $content;
 
 
1270
  }
1271
 
1272
  /* Check if we are inside category where buttons are hidden */
@@ -1284,7 +1337,9 @@ function hupso_the_content( $content ) {
1284
  if ( ($hupso_state == 'normal') && (@in_array($current_category, (array) $hupso_hide_categories)) ) {
1285
  $content = str_ireplace('[hupso_hide]', '', $content);
1286
  $content = str_ireplace('[hupso]', '', $content);
1287
- return $content;
 
 
1288
  }
1289
 
1290
  $hupso_title_text = get_option( 'hupso_title_text' , 'post' );
@@ -1516,7 +1571,7 @@ function hupso_plugin_action_links( $links, $file ) {
1516
 
1517
  // check to make sure we are on the correct plugin
1518
  if ( $file == $this_plugin ) {
1519
- $settings_link = '<a href="options-general.php?page=hupso-share-buttons-for-twitter-facebook-google/share-buttons-hupso.php">' . __('Settings', 'share_buttons_hupso') . '</a>';
1520
  array_unshift( $links, $settings_link );
1521
  }
1522
 
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, StumbleUpon, Digg, Reddit, Bebo 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.15
7
  Author: kasal
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
+ Text Domain: hupso
11
  Domain Path: /languages
12
  */
13
 
14
  global $HUPSO_VERSION;
15
+ $HUPSO_VERSION = '3.9.15';
16
 
17
  $hupso_dev = '';
18
  $hupso_state = 'normal';
51
  add_filter( 'get_the_excerpt', 'hupso_get_the_excerpt', 1);
52
  add_filter( 'the_excerpt', 'hupso_the_excerpt', 100 );
53
 
54
+ load_plugin_textdomain( 'hupso', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
55
 
56
  if ( is_admin() ) {
57
  add_filter('plugin_action_links', 'hupso_plugin_action_links', 10, 2);
76
  add_filter('widget_text', 'do_shortcode');
77
  }
78
 
79
+ /* Meta box on "Edit Post" screen */
80
+ $hupso_meta_box = get_option( 'hupso_meta_box', '' );
81
+ if ($hupso_meta_box == "1") {
82
+ include_once(plugin_dir_path( __FILE__ ) . '/share-buttons-hupso-meta.php');
83
+ }
84
 
85
  /* Add stylesheet */
86
  add_action( 'wp_enqueue_scripts', 'hupso_add_my_stylesheet' );
165
  delete_option( 'hupso_custom_icons' );
166
  delete_option( 'hupso_image_folder_url' );
167
  delete_option( 'hupso_background_color' );
168
+ delete_option( 'hupso_border_color' );
169
+ delete_option( 'hupso_meta_box' );
170
  }
171
 
172
  function hupso_plugin_activation() {
256
  );
257
 
258
 
259
+ $hupso_lang_code = __('en_US', 'hupso');
260
+ $hupso_language = __('English', 'hupso');
261
+ $hupso_share_image = __('Share', 'hupso');
262
+ $hupso_excerpts = __('Excerpts', 'hupso');
263
+ $hupso_feeds = __('Feeds', 'hupso');
264
 
265
  if ( !current_user_can( 'manage_options' ) ) {
266
+ wp_die( __( 'You do not have sufficient permissions to access this page.' , 'hupso') );
267
  }
268
 
269
  /* save settings */
273
 
274
 
275
  echo '<div class="wrap" style="padding-bottom:100px;"><div class="icon32" id="icon-users"></div>';
276
+ echo '<h2>'. __('Hupso Share Buttons for Twitter, Facebook & Google+ (Settings)', 'hupso').'</h2>';
277
  echo '<form name="hupso_settings_form" method="post" action="">';
278
 
279
  echo '<div id="right" style="float:right; width:200px; margin-right:10px; margin-left:20px; margin-top:20px;">';
280
+ echo '<div id="button_preview" style="background: #F7FFBF; padding: 10px 10px 10px 10px; "><table><tr><td><h3>' . __( 'Preview', 'hupso') . '</h3></td><td style="padding-left:50px;"><input class="button-primary" name="submit-preview" type="button" onclick="hupso_create_code()" value="' . __('Update', 'hupso') . '" /></td></tr></table><br/>';
281
  echo '<div id="button"></div>';
282
  echo '<div id="move_mouse"><p style="font-size:13px; padding-top: 15px;"><b>Move your mouse over the button to see the sharing menu.</b></p></div><br/><br/>';
283
+ echo '<div style="padding-left:40px;"><input class="button-primary" name="submit-preview" type="submit" onclick="hupso_create_code()" value="' . __('Save Settings', 'hupso') . '" /></div>';
284
  echo '</div>';
285
 
286
  echo '<div id="tips" style="background: #CCCCFF; padding: 10px 10px 10px 10px; margin-top:30px; ">';
287
+ echo '<p><b>' . __('Shortcodes', 'hupso') . '</b></p>';
288
  echo '<p>Use <b>[hupso_hide]</b> anywhere in post\'s text to hide buttons for specific post.</p>';
289
  echo '<p>Use <b>[hupso]</b> anywhere in post\'s text to show buttons for specific post at custom position.</p>';
290
  echo '<p>Use <b>Hupso Share Buttons Widget</b> to show share buttons in sidebar or footer.</p>';
346
  <div id="button_type">
347
  <table style="border: 0px;">
348
  <tr>
349
+ <td style="width:100px;"><?php _e('Button type', 'hupso'); ?>
350
  </td>
351
  <?php
352
  $hupso_button_type = get_option( 'hupso_button_type', 'share_toolbar' );
374
  <div id="button_style">
375
  <table style="border: 0px;">
376
  <tr>
377
+ <td style="width:100px;"><?php _e('Button size', 'hupso'); ?></td>
378
  <td>
379
  <table style="border: 0px;">
380
  <tr><td><input type="radio" name="size" value="button60x14" onclick="hupso_create_code()" onchange="hupso_create_code()" <?php echo $button60_checked; ?> /></td><td style="padding-right:10px;"><?php echo $button_60_img ?></td></tr>
382
  <tr><td><input type="radio" name="size" value="button100x23" onclick="hupso_create_code()" onchange="hupso_create_code()" <?php echo $button100_checked; ?>/></td><td style="padding-right:10px;"><?php echo $button_100_img ?></td></tr>
383
  <tr><td><input type="radio" name="size" value="button120x28" onclick="hupso_create_code()" onchange="hupso_create_code()" <?php echo $button120_checked; ?>/></td><td style="padding-right:10px;"><?php echo $button_120_img ?></td></tr>
384
  <tr><td><input type="radio" name="size" value="button160x37" onclick="hupso_create_code()" onchange="hupso_create_code()" <?php echo $button160_checked; ?>/></td><td style="padding-right:20px;"><?php echo $button_160_img ?></td></tr>
385
+ <tr><td><input type="radio" name="size" value="custom" onclick="hupso_create_code()" onchange="hupso_create_code()" <?php echo $share_button_custom_checked; ?> /></td><td style="padding-left:10px;"><?php _e('Custom image from URL', 'hupso'); ?>: <input type="text" name="hupso_button_image_custom_url" onchange="create_code()" style="width:300px;" value="<?php echo $hupso_button_image_custom_url; ?>"/><br/> See <a href="http://www.hupso.com/share/gallery.php" target="_blank">gallery of custom share buttons</a>.</td></tr> </td></tr>
386
  </table>
387
  <hr style="height:1px; width:500px;"/>
388
  </td>
393
  <div id="toolbar_size" style="display:none;">
394
  <table style="border: 0px;">
395
  <tr>
396
+ <td style="width:100px;"><?php _e('Toolbar size', 'hupso'); ?></td>
397
  <td style="width:100px">
398
  <?php
399
  $hupso_toolbar_size = get_option( 'hupso_toolbar_size', 'medium' );
408
  default: $hupso_toolbar_size_medium_checked = $checked;
409
  }
410
  ?>
411
+ <input type="radio" name="select_toolbar_size" value="big" onclick="hupso_create_code()" onchange="hupso_create_code()" <?php echo $hupso_toolbar_size_big_checked; ?> /> <?php _e( 'Big', 'hupso');?> <br/>
412
+ <input type="radio" name="select_toolbar_size" value="medium" onclick="hupso_create_code()" onchange="hupso_create_code()" <?php echo $hupso_toolbar_size_medium_checked; ?> /> <?php _e( 'Medium', 'hupso');?> <br/>
413
+ <input type="radio" name="select_toolbar_size" value="small" onclick="hupso_create_code()" onchange="hupso_create_code()" <?php echo $hupso_toolbar_size_small_checked; ?> /> <?php _e( 'Small', 'hupso');?> <br/>
414
  <hr style="height:1px; width:500px;"/>
415
  </td>
416
  </tr>
421
  <div id="share_image" style="padding-top:10px;">
422
  <table style="border: 0px;">
423
  <tr>
424
+ <td style="width:100px;"><?php _e('Share image', 'hupso'); ?></td>
425
  <td style="width:500px">
426
  <?php
427
 
444
  $hupso_share_image_custom_url = get_option ( 'hupso_share_image_custom_url', '' );
445
 
446
  ?>
447
+ <input type="radio" name="hupso_share_image" onclick="hupso_create_code()" onchange="hupso_create_code()" value="show" <?php echo $hupso_share_image_show_checked; ?>/> <?php _e('Show in language', 'hupso');?>:
448
  <select id="share_image_lang" name="share_image_lang" onclick="hupso_create_code()" onchange="hupso_create_code()">
449
  <option value="en" <?php if ( ($hupso_share_image_lang == 'en') || ($hupso_share_image_lang == '') ) echo ' selected ';?>>English</option>
450
  <option value="fr" <?php if ($hupso_share_image_lang == 'fr') echo ' selected ';?>>French</option>
471
  <option value="cs" <?php if ($hupso_share_image_lang == 'cs') echo ' selected ';?>>Czech</option>
472
  <option value="tr" <?php if ($hupso_share_image_lang == 'tr') echo ' selected ';?>>Turkish</option>
473
  </select><br/>
474
+ <input type="radio" name="hupso_share_image" onclick="hupso_create_code()" onchange="hupso_create_code()" value="hide" <?php echo $hupso_share_image_hide_checked; ?>/> <?php _e('Hide', 'hupso'); ?><br/>
475
+ <input type="radio" name="hupso_share_image" onclick="hupso_create_code()" onchange="hupso_create_code()" value="custom" <?php echo $hupso_share_image_custom_checked; ?>/> <?php _e('Custom image from URL', 'hupso'); ?>: <input name="hupso_share_image_custom_url" type="text" onmouseout="hupso_create_code()" onchange="hupso_create_code()" value="<?php echo $hupso_share_image_custom_url;?>" size="50" /><br/><span style="padding-left:30px; font-size:10px;">(<?php _e('Optimal image height: 32px - big, 24px - medium, 16px - small/counters', 'hupso'); ?>)</span><br/>
476
  <hr style="height:1px; width:500px;"/>
477
  </td>
478
  </tr>
496
  <div id="services">
497
  <table style="border: 0px;">
498
  <tr>
499
+ <td style="width:100px;"><?php _e('Social networks', 'hupso'); ?></td>
500
  <td><?php hupso_settings_print_services(); ?></td>
501
  </tr>
502
  </table>
539
  <div id="counters_config" style="display:none;">
540
  <table style="border: 0px;">
541
  <tr>
542
+ <td style="width:100px;"><?php _e('Social networks', 'hupso'); ?></td>
543
  <td>
544
  <table>
545
  <tr>
585
  </tr>
586
  <tr>
587
  <td style="padding-top:70px;">&nbsp;</td>
588
+ <td><? _e('Show counters in language', 'hupso');?>:
589
  <select id="hupso_counters_lang" name="hupso_counters_lang" onchange="hupso_create_code()" onclick="hupso_create_code()">
590
  <?php hupso_counters_lang_list(); ?>
591
  </select><br/><br/>
592
+ (<?php _e('Language changes will not show in preview', 'hupso');?>)
593
+ </td><td><?php _e('Select which language to use for Counters (Tweet, Facebook Like, Facebook Share...)', 'hupso');?>. <?php _e('Some social networks support more languages than others, so some buttons might get translated, while some might stay in English', 'hupso');?>.</td>
594
  </tr>
595
  </table>
596
 
602
  <div id="show_icons">
603
  <table style="border: 0px;">
604
  <tr>
605
+ <td style="width:100px;"><?php _e('Type of menu', 'hupso'); ?></td>
606
  <?php
607
  $menu_type = get_option( 'hupso_menu_type', 'labels' );
608
  $checked = ' checked="checked" ';
615
  }
616
 
617
  ?>
618
+ <td><hr style="height:1px; width:500px;"/><input type="radio" name="menu_type" value="labels" onclick="hupso_create_code()" <?php echo $hupso_labels_checked; ?> /> <?php _e('Show icons and service names', 'hupso'); ?><br/>
619
+ <input type="radio" name="menu_type" value="icons" onclick="hupso_create_code()" <?php echo $hupso_icons_checked; ?> /> <?php _e('Show icons only', 'hupso'); ?><br/></td>
620
  </tr>
621
  </table>
622
  </div>
623
 
624
  <table style="border: 0px;">
625
  <tr>
626
+ <td style="width:100px;"><?php _e('Button position', 'hupso'); ?></td>
627
  <?php
628
  $button_position = get_option( 'hupso_button_position', 'below' );
629
  $checked = ' checked="checked" ';
638
  }
639
  ?>
640
  <td><hr style="height:1px; width:500px;" align="left"/>
641
+ <input type="radio" name="hupso_button_position" value="above" <?php echo $hupso_above_checked; ?> /> <?php _e('Above the post', 'hupso'); ?><br/>
642
+ <input type="radio" name="hupso_button_position" value="below" <?php echo $hupso_below_checked; ?> /> <?php _e('Below the post', 'hupso'); ?><br/>
643
+ <input type="radio" name="hupso_button_position" value="both" <?php echo $hupso_both_checked; ?> /> <?php _e('Above and below the post', 'hupso'); ?><br/></td>
644
  </tr>
645
  <tr>
646
+ <td style="width:100px;"><?php _e('Show buttons on', 'hupso'); ?></td>
647
  <td><hr style="height:1px; width:500px;" align="left"/>
648
  <?php
649
  $checked = ' checked="checked" ';
702
  else
703
  $hupso_password_protected_checked = '';
704
 
 
 
705
  ?>
706
+ <input type="checkbox" name="hupso_show_posts" value="1" <?php echo $hupso_show_posts_checked; ?> /> <?php _e('Posts', 'hupso'); ?><br/>
707
+ <input type="checkbox" name="hupso_show_pages" value="1" <?php echo $hupso_show_pages_checked; ?> /> <?php _e('Pages', 'hupso'); ?><br/>
708
+ <input type="checkbox" name="hupso_show_frontpage" value="1" <?php echo $hupso_show_frontpage_checked; ?> /> <?php _e('Front page', 'hupso'); ?><br/>
709
+ <input type="checkbox" name="hupso_show_category" value="1" <?php echo $hupso_show_category_checked; ?> /> <?php _e('Archive pages (categories, tags, dates, authors)', 'hupso'); ?><br/>
710
+ <input type="checkbox" name="hupso_show_excerpts" value="1" <?php echo $hupso_show_excerpts_checked; ?> /> <?php _e('Excerpts', 'hupso'); ?><br/>
711
+ <input type="checkbox" name="hupso_show_search" value="1" <?php echo $hupso_show_search_checked; ?> /> <?php _e('Search pages', 'hupso'); ?><br/>
712
+ <input type="checkbox" name="hupso_password_protected" value="1" <?php echo $hupso_password_protected_checked; ?> /> <?php _e('Password protected posts', 'hupso'); ?><br/>
713
+ <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/>';
714
+ /* add meta box */
715
+ $checked = ' checked="checked" ';
716
+ $hupso_meta_box = get_option( 'hupso_meta_box', '' );
717
+ if ( $hupso_meta_box == 1 )
718
+ $hupso_meta_box_checked = $checked;
719
+ else
720
+ $hupso_meta_box_checked = '';
721
+ ?>
722
+ <input type="checkbox" name="hupso_meta_box" value="1" <?php echo $hupso_meta_box_checked; ?> /> <?php _e('Add share buttons option to "Edit Post" screen', 'hupso'); ?><br/>
723
  </td>
724
  </tr>
725
  <tr>
726
+ <td style="width:100px;"><?php _e('Hide buttons for specific categories', 'hupso'); ?></td>
727
+ <td><hr style="height:1px; width:500px;" align="left"/><table><tr><td>
728
  <?php
729
  /* hidden categories */
730
  $hupso_hide_categories = get_option( 'hupso_hide_categories', array() );
744
  echo $option;
745
  }
746
  ?>
747
+ <option value="hupso-option-always_show">--- <?php _e('Always show', 'hupso');?> ---</option>
748
+ </select></td><td>
749
+ <?php _e('Select categories where you want to hide share buttons.', 'hupso'); ?><br>
750
+ <?php _e('To select multiple categories, you need to hold down the Control Key for each selected category after the first one.', 'hupso');?><br />
751
+ <?php _e('Leave all options unselected or select just the last option to show buttons inside every category.', 'hupso');?>
752
+ </td></tr></table>
753
  </td>
754
  </tr>
755
  <tr>
756
+ <td style="width:100px;"><?php _e('Get share text from', 'hupso'); ?></td>
757
  <td><hr style="height:1px; width:500px;" align="left"/>
758
  <?php
759
  $checked = ' checked="checked" ';
767
  else
768
  $hupso_title_text_post_checked = $checked;
769
  ?>
770
+ <input type="radio" name="hupso_title_text" value="post" <?php echo $hupso_title_text_post_checked; ?> /> <?php _e('Title of post in Wordpress', 'hupso'); ?><br/>
771
+ <input type="radio" name="hupso_title_text" value="page" <?php echo $hupso_title_text_page_checked; ?> /> <?php _e('Title of current web page', 'hupso'); ?>
772
  </td>
773
  </tr>
774
 
775
  <tr>
776
+ <td style="width:100px;"><?php _e('Twitter via', 'hupso'); ?></td>
777
  <td><hr style="height:1px; width:500px;" align="left"/>
778
  <?php
779
 
781
  $hupso_twitter_via = get_option( 'hupso_twitter_via', '' );
782
 
783
  ?>
784
+ @<input type="text" name="hupso_twitter_via" onclick="hupso_create_code()" onchange="hupso_create_code()" onmouseout="hupso_create_code()" size="30" value="<?php echo $hupso_twitter_via; ?>" /> <span style="padding-left:30px;"><?php _e('Add "via @yourprofile" to tweets', 'hupso', 'hupso');?>.</span><br/>
785
  </td>
786
  </tr>
787
 
788
  <tr>
789
+ <td style="width:100px;"><?php _e('Image for Facebook thumbnail', 'hupso'); ?></td>
790
  <td><hr style="height:1px; width:500px;" align="left"/>
791
  <?php
792
 
826
  $header_image = trim(get_header_image());
827
 
828
  ?>
829
+ <span style="font-size:10px"><?php _e('All images for Facebook should be at least 200px in both dimensions (Facebook limitation)', 'hupso');?>.<br/><?php _e('After you change settings here, please wait 24 hours (or more) for Facebook to fetch new thumbnails', 'hupso');?>.<br/><?php _e('"og:image" meta tag with image url will be added to head of HTML. Select "None" to disable this feature', 'hupso');?>.<br/></span><br/>
830
 
831
+ <input type="radio" name="hupso_facebook_image" onclick="hupso_create_code()" onchange="hupso_create_code()" value="header" <?php echo $hupso_facebook_image_header_checked; ?>/> <?php _e('Header image', 'hupso'); ?> <?php if ( $header_image != '' ) { echo '(<a href="' . $header_image . '" title="' . __( 'Click here to see full header image', 'hupso' ) . '" target="_blank">' . __( 'preview', 'hupso' ) . '</a>)'; } ?><br/>
832
+ <input type="radio" name="hupso_facebook_image" onclick="hupso_create_code()" onchange="hupso_create_code()" value="featured" <?php echo $hupso_facebook_image_featured_checked; ?>/> <?php _e('Featured image of post', 'hupso'); ?><br/>
833
+ <input type="radio" name="hupso_facebook_image" onclick="hupso_create_code()" onchange="hupso_create_code()" value="custom" <?php echo $hupso_facebook_image_custom_checked; ?>/> <?php _e('Custom image from URL', 'hupso'); ?>: <input type="text" name="hupso_facebook_custom_image" onclick="hupso_create_code()" onchange="hupso_create_code()" onmouseout="hupso_create_code()" size="50" value="<?php echo $hupso_facebook_custom_image; ?>" /><br/>
834
+ <input type="radio" name="hupso_facebook_image" onclick="hupso_create_code()" onchange="hupso_create_code()" value="none" <?php echo $hupso_facebook_image_none_checked; ?>/> <?php _e('None', 'hupso'); ?><br/>
835
+ <input type="radio" name="hupso_facebook_image" onclick="hupso_create_code()" onchange="hupso_create_code()" value="fch" <?php echo $hupso_facebook_image_fch_checked; ?>/> <?php _e('FCH - use Featured image of post (if available), then use Custom image (if available), then use Header image (if available)', 'hupso'); ?><br/>
836
  </td>
837
  </tr>
838
 
839
  <tr>
840
+ <td style="width:100px;"><?php _e('CSS style', 'hupso'); ?></td>
841
  <td><hr style="height:1px; width:400px;" align="left"/>
842
  <?php
843
 
845
  $hupso_css_style = get_option( 'hupso_css_style', 'padding-bottom:20px; padding-top:10px;');
846
 
847
  ?>
848
+ <input type="text" name="hupso_css_style" style="width:400px;" value="<?php echo $hupso_css_style;?>" /><br/><span><?php _e('Use CSS to style share buttons. For example: you can increase padding to have more free space above or below the buttons', 'hupso');?>.</span><br/>
849
  </td>
850
  </tr>
851
 
852
  <tr>
853
+ <td style="width:100px;"><?php _e('Widget Text', 'hupso'); ?></td>
854
  <td><hr style="height:1px; width:400px;" align="left"/>
855
  <?php
856
 
863
  $hupso_widget_text_checked = '';
864
 
865
  ?>
866
+ <input type="checkbox" name="hupso_widget_text" value="1" <?php echo $hupso_widget_text_checked; ?> /> <?php _e('Use shortcodes in text widgets', 'hupso'); ?><br/><?php _e('If this is checked, you can use [hupso] shortcode inside text widgets and it will be replaced by share buttons', 'hupso'); ?>.
867
  </td>
868
  </tr>
869
 
870
  <tr>
871
+ <td style="width:100px;"><?php _e('Custom title', 'hupso'); ?></td>
872
  <td><hr style="height:1px; width:400px;" align="left"/>
873
  <?php
874
  /* page_title */
876
  $hupso_page_title = stripslashes(get_option( 'hupso_page_title', ''));
877
  $hupso_page_title = htmlentities($hupso_page_title);
878
  ?>
879
+ <input type="text" name="page_title" value="<?php echo $hupso_page_title;?>" onchange="hupso_create_code()" onmouseout="hupso_create_code()" size="50" /><br/><?php _e('Enter custom text that will always be used for sharing.', 'hupso'); ?><br/><?php _e('Leave this blank to use title of current page as text for sharing. [Default]', 'hupso'); ?>
880
  </td>
881
  </tr>
882
 
883
  <tr>
884
+ <td style="width:100px;"><?php _e('Custom url', 'hupso'); ?></td>
885
  <td><hr style="height:1px; width:400px;" align="left"/>
886
  <?php
887
  /* page_url */
888
  $checked = ' checked="checked" ';
889
  $hupso_page_url = get_option( 'hupso_page_url', '');
890
  ?>
891
+ <input type="text" name="page_url" value="<?php echo $hupso_page_url;?>" onchange="hupso_create_code()" onmouseout="hupso_create_code()" size="50" /><br/><?php _e('Enter custom url that will always be used for sharing. You can enter your root website here (e.g.: http://www.example.com or http://example.blogspot.com, so counters will show statistics for your whole website, not for each page individually.', 'hupso'); ?><br/><?php _e('Leave this blank to use url of current page for sharing. [Default]', 'hupso'); ?>
892
  </td>
893
  </tr>
894
 
895
  <tr>
896
+ <td style="width:100px;"><?php _e('Use custom social share icons', 'hupso'); ?></div></td>
897
  <td><hr style="height:1px; width:400px;" align="left"/>
898
  <?php
899
  /* image_folder_url */
910
  }
911
  $image_url = plugins_url('/hupso-share-buttons-for-twitter-facebook-google/img/services/');
912
  ?>
913
+ <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/>
914
+ <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'); ?>
915
  [<?php echo $image_url;?>]<br/>
916
+ <input type="radio" name="hupso_custom_icons" onclick="hupso_create_code()" onchange="hupso_create_code()" value="custom" <?php echo $hupso_custom_icons_custom_checked; ?>/> <?php _e('Yes, serve images from remote URL: ', 'hupso'); ?><br/>
917
+ <input type="text" name="hupso_image_folder_url" value="<?php echo $hupso_image_folder_url;?>" onchange="hupso_create_code()" onmouseout="hupso_create_code()" size="50" /><br/><input type="hidden" name="hupso_image_folder_local" value="<?php echo $image_url;?>" /><?php _e('Enter URL to folder with custom social images. Include "/" at the end of the URL. If you would like to use custom icons, make sure you <a href="http://www.hupso.com/share/custom-social-icons.php" target="_blank">read instructions</a>.', 'hupso'); ?><br/><?php _e('This setting has no effect when using Counters.', 'hupso'); ?>
918
  </td>
919
  </tr>
920
  </div>
921
 
922
  </table>
923
+ <br/><br/><input class="button-primary" name="submit" type="submit" onclick="hupso_create_code()" value="<?php _e('Save Settings', 'hupso'); ?>" />
924
  </form>
925
  </div>
926
 
1177
  update_option( 'hupso_share_buttons_code', $code );
1178
  }
1179
 
1180
+ /* save hupso_meta_box */
1181
+ if ( $post ) {
1182
+ $hupso_meta_box = @$_POST[ 'hupso_meta_box' ];
1183
+ update_option( 'hupso_meta_box', $hupso_meta_box );
1184
+ }
1185
+
1186
+
1187
+
1188
  }
1189
 
1190
 
1215
 
1216
  function hupso_the_content( $content ) {
1217
 
1218
+ global $hupso_plugin_url, $wp_version, $hupso_dev, $hupso_state, $HUPSO_SHOW, $hupso_p, $post;
1219
+
1220
+ $value = '';
1221
+ $hupso_meta_box = get_option( 'hupso_meta_box', '' );
1222
+ if ($hupso_meta_box != "1") {
1223
+ $value = '';
1224
+ } else {
1225
+ $value = get_post_meta( $post->ID, 'hupso-share-buttons', true );
1226
+ if ($value == 'default') {
1227
+ $value = '';
1228
+ }
1229
+
1230
+ if ($value == 'disabled') {
1231
+ $content = str_ireplace('[hupso_hide]', '', $content);
1232
+ $content = str_ireplace('[hupso]', '', $content);
1233
+ if ($value != 'enabled')
1234
+ return $content;
1235
+ }
1236
+ }
1237
 
1238
  if ($HUPSO_SHOW == false) {
1239
  $content = str_ireplace('[hupso_hide]', '', $content);
1240
  $content = str_ireplace('[hupso]', '', $content);
1241
+ if ($value != 'enabled')
1242
+ return $content;
1243
  }
1244
 
1245
  /* Do now show share buttons when [hupso_hide] is used */
1246
  if ( ($hupso_state == 'normal') && ( stripos($content, '[hupso_hide]') !== false ) ) {
1247
  $content = str_ireplace('[hupso_hide]', '', $content);
1248
  $content = str_ireplace('[hupso]', '', $content);
1249
+ if ($value != 'enabled')
1250
+ return $content;
1251
  }
1252
 
1253
  /* Do not show share buttons in feeds */
1254
  if ( ($hupso_state == 'normal') && (is_feed()) ) {
1255
  $content = str_ireplace('[hupso_hide]', '', $content);
1256
  $content = str_ireplace('[hupso]', '', $content);
1257
+ if ($value != 'enabled')
1258
+ return $content;
1259
  }
1260
 
1261
  /* Do not show share buttons on password protected pages, but show it inside widget */
1264
  if ( $hupso_state == 'normal' ) {
1265
  if ($pass != '') {
1266
  if (!$hupso_password_protected) {
1267
+ if ($value != 'enabled')
1268
+ return $content;
1269
  }
1270
  else {
1271
  if (post_password_required()) {
1272
+ if ($value != 'enabled')
1273
+ return $content;
1274
  }
1275
  }
1276
  }
1280
  if ( ($hupso_state == 'normal') && (is_search()) && ($hupso_show_search != 1) ) {
1281
  $content = str_ireplace('[hupso_hide]', '', $content);
1282
  $content = str_ireplace('[hupso]', '', $content);
1283
+ if ($value != 'enabled')
1284
+ return $content;
1285
  }
1286
 
1287
  $hupso_show_posts = get_option( 'hupso_show_posts' , '1' );
1288
  if ( ($hupso_state == 'normal') && (is_single()) && ($hupso_show_posts != 1) ) {
1289
  $content = str_ireplace('[hupso_hide]', '', $content);
1290
  $content = str_ireplace('[hupso]', '', $content);
1291
+ if ($value != 'enabled')
1292
+ return $content;
1293
+
1294
  }
1295
 
1296
  $hupso_show_pages = get_option( 'hupso_show_pages' , '1' );
1297
  if ( ($hupso_state == 'normal') && (is_page()) && ($hupso_show_pages != 1) ) {
1298
  $content = str_ireplace('[hupso_hide]', '', $content);
1299
  $content = str_ireplace('[hupso]', '', $content);
1300
+ if ($value != 'enabled')
1301
+ return $content;
1302
+
1303
  }
1304
 
1305
  $hupso_show_frontpage = get_option( 'hupso_show_frontpage' , '1' );
1309
  if ( ($hupso_state == 'normal') && (is_home()) && ($hupso_show_frontpage != 1) ) {
1310
  $content = str_ireplace('[hupso_hide]', '', $content);
1311
  $content = str_ireplace('[hupso]', '', $content);
1312
+ if ($value != 'enabled')
1313
+ return $content;
1314
+
1315
  }
1316
  /* Do not show share buttons if option is disabled */
1317
  if ( ($hupso_state == 'normal') && (is_archive()) && ($hupso_show_category != 1) ) {
1318
  $content = str_ireplace('[hupso_hide]', '', $content);
1319
  $content = str_ireplace('[hupso]', '', $content);
1320
+ if ($value != 'enabled')
1321
+ return $content;
1322
+
1323
  }
1324
 
1325
  /* Check if we are inside category where buttons are hidden */
1337
  if ( ($hupso_state == 'normal') && (@in_array($current_category, (array) $hupso_hide_categories)) ) {
1338
  $content = str_ireplace('[hupso_hide]', '', $content);
1339
  $content = str_ireplace('[hupso]', '', $content);
1340
+ if ($value != 'enabled')
1341
+ return $content;
1342
+
1343
  }
1344
 
1345
  $hupso_title_text = get_option( 'hupso_title_text' , 'post' );
1571
 
1572
  // check to make sure we are on the correct plugin
1573
  if ( $file == $this_plugin ) {
1574
+ $settings_link = '<a href="options-general.php?page=hupso-share-buttons-for-twitter-facebook-google/share-buttons-hupso.php">' . __('Settings', 'hupso') . '</a>';
1575
  array_unshift( $links, $settings_link );
1576
  }
1577