Social Media Share Buttons & Social Sharing Icons - Version 1.7.6

Version Description

  • Comment to selecting of specific text and picture per page/post added
Download this release

Release Info

Developer socialdude
Plugin Icon 128x128 Social Media Share Buttons & Social Sharing Icons
Version 1.7.6
Comparing to
See all releases

Code changes from version 1.7.5 to 1.7.6

css/sfsi-admin-style.css CHANGED
@@ -1911,4 +1911,17 @@ color: #38B54A
1911
  .sfsi_curlerrorNotification .sfsi_curlerror{background:rgba(244, 67, 54, 0.08);padding: 20px; line-height: 20px;margin: 0px 0px 10px 0px;}
1912
  .sfsi_curlerror_cross{float: right;text-decoration: underline;margin-top: 10px;}
1913
  .sfsi_curlerrortab4 a{color: #0073aa !important;}
1914
- .sfsi_curlerror a{color: #0073aa !important;}
 
 
 
 
 
 
 
 
 
 
 
 
 
1911
  .sfsi_curlerrorNotification .sfsi_curlerror{background:rgba(244, 67, 54, 0.08);padding: 20px; line-height: 20px;margin: 0px 0px 10px 0px;}
1912
  .sfsi_curlerror_cross{float: right;text-decoration: underline;margin-top: 10px;}
1913
  .sfsi_curlerrortab4 a{color: #0073aa !important;}
1914
+ .sfsi_curlerror a{color: #0073aa !important;}
1915
+
1916
+ .social_data_post_types{float: left;width: 100%;margin-top: 10px;}
1917
+ .social_data_post_types .checkbox{ float: left;margin-top: 5px; margin-right: 5px;}
1918
+ .social_data_post_types ul{ float: left; margin-top: 5px;}
1919
+ .social_data_post_types li {float: left; min-width: 90px;}
1920
+ .social_data_post_types .radio_section.tb_4_ck{ float: left; margin-right: 5px; }
1921
+ .social_data_post_types .radio_section.tb_4_ck .cstmdsplsub{font-size: 16px;}
1922
+ .social_data_post_types ul {float: left;width:84%;}
1923
+ .social_data_post_types .radio_section.tb_4_ck input.styled { margin-top:20px; }
1924
+ ul.sfsi_show_hide_section {float: right;width: 14%;}
1925
+
1926
+ .sfsi_social_sharing{margin-bottom: 15px;float: left;width: 51%;}
1927
+ .socialPostTypesUl span {pointer-events: none}
js/custom-admin.js CHANGED
@@ -521,6 +521,9 @@ function sfsi_update_step5() {
521
  SFSI("input[name='sfsi_custom_MouseOverTexts[]']").each(function() {
522
  O[SFSI(this).attr("file-id")] = this.value;
523
  });
 
 
 
524
  var T = {
525
  action:"updateSrcn5",
526
  sfsi_icons_size:i,
@@ -558,6 +561,7 @@ function sfsi_update_step5() {
558
  sfsi_instagramIcon_order:I,
559
  sfsi_linkedinIcon_order:F,
560
  sfsi_custom_orders:h,
 
561
  nonce:nonce
562
  };
563
  SFSI.ajax({
@@ -2080,6 +2084,24 @@ SFSI(document).ready(function(s) {
2080
  },
2081
  revert:!0
2082
  }),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2083
  /*SFSI(".radio").live("click", function() {*/
2084
  SFSI(document).on("click", '.radio', function () {
2085
  var s = SFSI(this).parent().find("input:radio:first");
521
  SFSI("input[name='sfsi_custom_MouseOverTexts[]']").each(function() {
522
  O[SFSI(this).attr("file-id")] = this.value;
523
  });
524
+
525
+ var sfsi_custom_social_hide = SFSI("input[name='sfsi_custom_social_hide']").val();
526
+
527
  var T = {
528
  action:"updateSrcn5",
529
  sfsi_icons_size:i,
561
  sfsi_instagramIcon_order:I,
562
  sfsi_linkedinIcon_order:F,
563
  sfsi_custom_orders:h,
564
+ sfsi_custom_social_hide:sfsi_custom_social_hide,
565
  nonce:nonce
566
  };
567
  SFSI.ajax({
2084
  },
2085
  revert:!0
2086
  }),
2087
+
2088
+ //*------------------------------- Sharing text & pcitures checkbox for showing section in Page, Post STARTS -------------------------------------//
2089
+
2090
+ SFSI(document).on("click", '.checkbox', function () {
2091
+
2092
+ var s = SFSI(this).parent().find("input:checkbox:first");
2093
+
2094
+ if(s.attr('name')== "sfsi_custom_social_hide"){
2095
+ var backgroundPos = jQuery(this).css('background-position').split(" ");
2096
+ var xPos = backgroundPos[0],
2097
+ yPos = backgroundPos[1];
2098
+ var val = (yPos=="0px") ? "no":"yes";
2099
+ SFSI('input[name="sfsi_custom_social_hide"]').val(val);
2100
+ }
2101
+ });
2102
+
2103
+ //*------------------------------- Sharing text & pcitures checkbox for showing section in Page, Post CLOSES -------------------------------------//
2104
+
2105
  /*SFSI(".radio").live("click", function() {*/
2106
  SFSI(document).on("click", '.radio', function () {
2107
  var s = SFSI(this).parent().find("input:radio:first");
libs/controllers/sfsi_buttons_controller.php CHANGED
@@ -388,6 +388,8 @@ function sfsi_options_updater5()
388
  $sfsi_linkedinIcon_order = isset($_POST["sfsi_linkedinIcon_order"]) ? $_POST["sfsi_linkedinIcon_order"] : '9';
389
  $sfsi_custom_MouseOverTexts = isset($_POST["sfsi_custom_MouseOverTexts"]) ? serialize($_POST["sfsi_custom_MouseOverTexts"]) : '';
390
 
 
 
391
  /* size and spacing of icons */
392
  $up_option5=array(
393
  'sfsi_icons_size' => intval($sfsi_icons_size),
@@ -425,7 +427,8 @@ function sfsi_options_updater5()
425
  'sfsi_pinterestIcon_order' => intval($sfsi_pinterestIcon_order),
426
  'sfsi_instagramIcon_order' => intval($sfsi_instagramIcon_order),
427
  'sfsi_linkedinIcon_order' => intval($sfsi_linkedinIcon_order),
428
- 'sfsi_custom_MouseOverTexts' => $sfsi_custom_MouseOverTexts
 
429
  );
430
 
431
  update_option('sfsi_section5_options', serialize($up_option5));
388
  $sfsi_linkedinIcon_order = isset($_POST["sfsi_linkedinIcon_order"]) ? $_POST["sfsi_linkedinIcon_order"] : '9';
389
  $sfsi_custom_MouseOverTexts = isset($_POST["sfsi_custom_MouseOverTexts"]) ? serialize($_POST["sfsi_custom_MouseOverTexts"]) : '';
390
 
391
+ $sfsi_custom_social_hide = isset($_POST["sfsi_custom_social_hide"]) ? $_POST["sfsi_custom_social_hide"] : 'no';
392
+
393
  /* size and spacing of icons */
394
  $up_option5=array(
395
  'sfsi_icons_size' => intval($sfsi_icons_size),
427
  'sfsi_pinterestIcon_order' => intval($sfsi_pinterestIcon_order),
428
  'sfsi_instagramIcon_order' => intval($sfsi_instagramIcon_order),
429
  'sfsi_linkedinIcon_order' => intval($sfsi_linkedinIcon_order),
430
+ 'sfsi_custom_MouseOverTexts' => $sfsi_custom_MouseOverTexts,
431
+ 'sfsi_custom_social_hide' => $sfsi_custom_social_hide
432
  );
433
 
434
  update_option('sfsi_section5_options', serialize($up_option5));
libs/sfsi_ajax_social_sharing_settings_updater.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ add_action( 'wp_ajax_update_sharing_settings', 'update_sharing_settings' );
3
+
4
+ function update_sharing_settings() {
5
+ $option5 = unserialize(get_option('sfsi_section5_options',false));
6
+ $option5['sfsi_custom_social_hide'] = $_POST['sfsi_custom_social_hide'];
7
+ update_option('sfsi_section5_options',serialize($option5));
8
+ echo true;
9
+ wp_die(); // this is required to terminate immediately and return a proper response
10
+ }
11
+ ?>
libs/sfsi_custom_social_sharing_data.php ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ function sfsi_social_media_metabox( $post ) { ?>
4
+ <style>
5
+ .sfsi_new_prmium_follw p {
6
+ width: 90%;
7
+ color: #1a1d20 !important;
8
+ font-size: 17px !important;
9
+ font-family: helveticaregular !important;
10
+ }
11
+ .sfsi_new_prmium_follw {
12
+ width: 97%;
13
+ margin-top: 8px;
14
+ display: inline-block;
15
+ background: #f3faf6;
16
+ border: 1px solid #12a252;
17
+ padding: 0px 25px 0px 15px;
18
+ height: 63px;
19
+ clear: both;
20
+ position: relative;
21
+ }
22
+ .sfsi_new_prmium_sharing p a {
23
+ color: #12a252 !important;
24
+ border-bottom: 1px solid #12a252;
25
+ text-decoration: none;
26
+ }
27
+ .sfsi_new_prmium_follw p b {
28
+ font-weight: bold;
29
+ color: #1a1d20 !important;
30
+ }
31
+ .sfsi_hidenotice{
32
+ cursor: pointer;
33
+ float: right;
34
+ position: absolute;
35
+ right: 10px;
36
+ top: 21px;
37
+ color: grey;
38
+ font-size: 13px;
39
+ }
40
+ </style>
41
+
42
+ <script type="text/javascript">
43
+ jQuery(document).ready(function(){
44
+ jQuery('.sfsi_hidenotice').on('click',function(){
45
+ var data = {
46
+ action:"update_sharing_settings",
47
+ sfsi_custom_social_hide:"yes"
48
+ };
49
+ jQuery.post(ajaxurl, data, function(response) {
50
+ if(response){
51
+ alert('Settings updated');
52
+ jQuery('#sfsi-social-media').remove();
53
+ }
54
+ });
55
+ });
56
+ });
57
+ </script>
58
+
59
+ <div class="sfsi_new_prmium_follw"><p><b>New:</b> The Premium Plugin (Ultimate Social Media) allows you to define which picture, snippet text or tweet gets shared. <a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_post_or_page&utm_campaign=define_pic_and_text&utm_medium=banner"target="_blank">See all features</a></p><a class="sfsi_hidenotice" href="javascript:void(0)">Hide this notice</a></div>
60
+
61
+ <?php }
62
+
63
+
64
+ function sfsi_icons_add_meta_boxes() {
65
+ $screen = get_current_screen();
66
+ $option5 = unserialize(get_option('sfsi_section5_options',false));
67
+ $hideSectionVal = (isset($option5['sfsi_custom_social_hide'])) ? $option5['sfsi_custom_social_hide']: 'no';
68
+
69
+ if($hideSectionVal=='no'){
70
+ if(isset($screen->post_type) && ('page'==$screen->post_type || 'post'==$screen->post_type)){
71
+ add_meta_box( 'sfsi-social-media', 'Ultimate Social Media – Sharing text & pictures', 'sfsi_social_media_metabox', $screen->post_type, 'normal', 'low' );
72
+ }
73
+ }
74
+ }
75
+ add_action( 'add_meta_boxes', 'sfsi_icons_add_meta_boxes' );
76
+ ?>
libs/sfsi_install_uninstall.php CHANGED
@@ -12,7 +12,7 @@ function sfsi_update_plugin()
12
  }
13
 
14
  //Install version
15
- update_option("sfsi_pluginVersion", "1.75");
16
 
17
  if(!get_option('sfsi_serverphpVersionnotification'))
18
  {
@@ -131,6 +131,13 @@ function sfsi_update_plugin()
131
  $option4['sfsi_instagram_token'] = '';
132
  update_option('sfsi_section4_options', serialize($option4));
133
  }
 
 
 
 
 
 
 
134
  }
135
  function sfsi_activate_plugin()
136
  {
@@ -301,6 +308,7 @@ function sfsi_activate_plugin()
301
  'sfsi_youtube_MouseOverText'=>'YouTube',
302
  'sfsi_share_MouseOverText'=>'Share',
303
  'sfsi_custom_MouseOverTexts'=>'',
 
304
  );
305
  add_option('sfsi_section5_options', serialize($options5));
306
 
12
  }
13
 
14
  //Install version
15
+ update_option("sfsi_pluginVersion", "1.76");
16
 
17
  if(!get_option('sfsi_serverphpVersionnotification'))
18
  {
131
  $option4['sfsi_instagram_token'] = '';
132
  update_option('sfsi_section4_options', serialize($option4));
133
  }
134
+
135
+ $option5 = unserialize(get_option('sfsi_section5_options',false));
136
+ if(isset($option5) && !empty($option5) && !isset($option5['sfsi_custom_social_hide']))
137
+ {
138
+ $option5['sfsi_custom_social_hide'] = 'no';
139
+ update_option('sfsi_section5_options', serialize($option5));
140
+ }
141
  }
142
  function sfsi_activate_plugin()
143
  {
308
  'sfsi_youtube_MouseOverText'=>'YouTube',
309
  'sfsi_share_MouseOverText'=>'Share',
310
  'sfsi_custom_MouseOverTexts'=>'',
311
+ 'sfsi_custom_social_hide' => 'no'
312
  );
313
  add_option('sfsi_section5_options', serialize($options5));
314
 
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: socialdude
3
  Tags: social media, share, buttons, social, icons, share icons, share buttons, sharing icons, sharing buttons, social share, sharing, social sharing
4
  Requires at least: 2.8
5
- Tested up to: 4.8
6
- Stable tag: 1.7.5
7
  License: GPLv2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -267,6 +267,9 @@ You cannot use the same plugin twice, however you can install both the USM as we
267
 
268
  == Changelog ==
269
 
 
 
 
270
  = 1.7.5 =
271
  * Link to more premium icons added
272
 
@@ -627,5 +630,5 @@ You cannot use the same plugin twice, however you can install both the USM as we
627
 
628
  == Upgrade Notice ==
629
 
630
- = 1.7.5 =
631
  Please upgrade
2
  Contributors: socialdude
3
  Tags: social media, share, buttons, social, icons, share icons, share buttons, sharing icons, sharing buttons, social share, sharing, social sharing
4
  Requires at least: 2.8
5
+ Tested up to: 4.8.1
6
+ Stable tag: 1.7.6
7
  License: GPLv2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
267
 
268
  == Changelog ==
269
 
270
+ = 1.7.6 =
271
+ * Comment to selecting of specific text and picture per page/post added
272
+
273
  = 1.7.5 =
274
  * Link to more premium icons added
275
 
630
 
631
  == Upgrade Notice ==
632
 
633
+ = 1.7.6 =
634
  Please upgrade
ultimate_social_media_icons.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://ultimatelysocial.com
5
  Description: Easy to use and 100% FREE social media plugin which adds social media icons to your website with tons of customization features!.
6
  Author: UltimatelySocial
7
  Author URI: http://ultimatelysocial.com
8
- Version: 1.7.5
9
  License: GPLv2 or later
10
  */
11
  global $wpdb;
@@ -26,13 +26,15 @@ include(SFSI_DOCROOT.'/libs/controllers/sfsi_frontpopUp.php');
26
  include(SFSI_DOCROOT.'/libs/controllers/sfsiocns_OnPosts.php');
27
  include(SFSI_DOCROOT.'/libs/sfsi_widget.php');
28
  include(SFSI_DOCROOT.'/libs/sfsi_subscribe_widget.php');
 
 
29
 
30
  /* plugin install and uninstall hooks */
31
  register_activation_hook(__FILE__, 'sfsi_activate_plugin' );
32
  register_deactivation_hook(__FILE__, 'sfsi_deactivate_plugin');
33
  register_uninstall_hook(__FILE__, 'sfsi_Unistall_plugin');
34
 
35
- if(!get_option('sfsi_pluginVersion') || get_option('sfsi_pluginVersion') < 1.75)
36
  {
37
  add_action("init", "sfsi_update_plugin");
38
  }
5
  Description: Easy to use and 100% FREE social media plugin which adds social media icons to your website with tons of customization features!.
6
  Author: UltimatelySocial
7
  Author URI: http://ultimatelysocial.com
8
+ Version: 1.7.6
9
  License: GPLv2 or later
10
  */
11
  global $wpdb;
26
  include(SFSI_DOCROOT.'/libs/controllers/sfsiocns_OnPosts.php');
27
  include(SFSI_DOCROOT.'/libs/sfsi_widget.php');
28
  include(SFSI_DOCROOT.'/libs/sfsi_subscribe_widget.php');
29
+ include(SFSI_DOCROOT.'/libs/sfsi_custom_social_sharing_data.php');
30
+ include(SFSI_DOCROOT.'/libs/sfsi_ajax_social_sharing_settings_updater.php');
31
 
32
  /* plugin install and uninstall hooks */
33
  register_activation_hook(__FILE__, 'sfsi_activate_plugin' );
34
  register_deactivation_hook(__FILE__, 'sfsi_deactivate_plugin');
35
  register_uninstall_hook(__FILE__, 'sfsi_Unistall_plugin');
36
 
37
+ if(!get_option('sfsi_pluginVersion') || get_option('sfsi_pluginVersion') < 1.76)
38
  {
39
  add_action("init", "sfsi_update_plugin");
40
  }
views/sfsi_option_view5.php CHANGED
@@ -295,7 +295,53 @@
295
  </div>
296
  <!--disable float icons-->
297
  </div><!-- END icon's floating and stick section -->
298
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
299
  <!-- mouse over text section start here -->
300
  <div class="row mouse_txt">
301
  <h4>Mouseover text</h4>
295
  </div>
296
  <!--disable float icons-->
297
  </div><!-- END icon's floating and stick section -->
298
+
299
+ <!--******************************************************* Sharing texts & pictures section STARTS *********************************************************************-->
300
+
301
+ <div class="row sfsi_custom_social_data_setting" id="custom_social_data_setting">
302
+
303
+ <h4>Sharing texts & pictures?</h4>
304
+ <p>On the pages where you edit your posts / pages you’ll see a (new) section where you can define which pictures & text should be shared. This extra section is displayed on the following:</p>
305
+
306
+ <?php
307
+ $checkedS = (isset($option5['sfsi_custom_social_hide']) && $option5['sfsi_custom_social_hide']=="yes") ? 'checked="checked"': '';
308
+ $checked = (isset($option5['sfsi_custom_social_hide']) && $option5['sfsi_custom_social_hide']=="yes") ? '': 'checked="checked"';
309
+ $checkedVal = (isset($option5['sfsi_custom_social_hide'])) ? $option5['sfsi_custom_social_hide']: 'no';
310
+ ?>
311
+ <div class="social_data_post_types">
312
+ <ul class="socialPostTypesUl">
313
+ <li>
314
+ <div class="radio_section tb_4_ck">
315
+ <input type="checkbox" <?php echo $checked; ?> value="page" class="styled" />
316
+ <label class="cstmdsplsub">Page</label>
317
+ </div>
318
+ </li>
319
+ <li>
320
+ <div class="radio_section tb_4_ck">
321
+ <input type="checkbox" <?php echo $checked; ?> value="post" class="styled" />
322
+ <label class="cstmdsplsub">Post</label>
323
+ </div>
324
+ </li>
325
+ </ul>
326
+
327
+ <ul class="sfsi_show_hide_section">
328
+ <li>
329
+ <div class="radio_section tb_4_ck">
330
+ <input name="sfsi_custom_social_hide" type="checkbox" <?php echo $checkedS; ?> value="<?php echo $checkedVal; ?>" class="styled" />
331
+ <label class="cstmdsplsub">Hide section for all</label>
332
+ </div>
333
+ </li>
334
+ </ul>
335
+ </div>
336
+
337
+ <div class="sfsi_new_prmium_follw sfsi_social_sharing" style="margin-bottom: 15px;">
338
+ <p>Note: This feature is currently only available in the Premium Plugin. <a href="https://www.ultimatelysocial.com/usm-premium/?utm_source=usmi_settings_page&utm_campaign=define_pic_and_text&utm_medium=banner" target="_blank">See all features</a>
339
+ </p>
340
+ </div>
341
+ </div>
342
+
343
+ <!--******************************************************* Sharing texts & pictures section CLOSES *********************************************************************-->
344
+
345
  <!-- mouse over text section start here -->
346
  <div class="row mouse_txt">
347
  <h4>Mouseover text</h4>