Simple Social Media Share Buttons – Social Sharing for Everyone - Version 3.2.4

Version Description

  • 2021-09-07 =
  • Bugfix: Sanitize the input fields.
  • Enhancement: Added a filter ssb_get_share_post can be used to change the post that is shared.
Download this release

Release Info

Developer hiddenpearls
Plugin Icon 128x128 Simple Social Media Share Buttons – Social Sharing for Everyone
Version 3.2.4
Comparing to
See all releases

Code changes from version 3.2.3 to 3.2.4

classes/ssb-settings.php CHANGED
@@ -320,6 +320,8 @@ class Ssb_Settings {
320
  'label' => __( 'Share Title', 'simple-social-buttons' ),
321
  'type' => 'ssb_text',
322
  'priority' => '57',
 
 
323
  ),
324
  array(
325
  'name' => 'posts',
@@ -424,6 +426,8 @@ class Ssb_Settings {
424
  'type' => 'ssb_checkbox',
425
  'label' => __( 'Open Graph Tags', 'simple-social-buttons' ),
426
  'default' => '1',
 
 
427
  ),
428
  array(
429
  'name' => 'ssb_uninstall_data',
@@ -436,11 +440,15 @@ class Ssb_Settings {
436
  'desc' => '<h4> Facebook App</h4><a href="https://wpbrigade.com/how-to-create-facebook-app-and-get-app-id-and-secret/" target="_blank">how to make App</a>',
437
  'type' => 'ssb_text',
438
  'label' => __( 'Facebook App ID:', 'simple-social-buttons' ),
 
 
439
  ),
440
  array(
441
  'name' => 'facebook_app_secret',
442
  'type' => 'ssb_text',
443
  'label' => __( 'Facebook App Secret:', 'simple-social-buttons' ),
 
 
444
  ),
445
  array(
446
  'name' => 'ssb_css',
320
  'label' => __( 'Share Title', 'simple-social-buttons' ),
321
  'type' => 'ssb_text',
322
  'priority' => '57',
323
+ 'sanitize_callback' => 'sanitize_text_field',
324
+
325
  ),
326
  array(
327
  'name' => 'posts',
426
  'type' => 'ssb_checkbox',
427
  'label' => __( 'Open Graph Tags', 'simple-social-buttons' ),
428
  'default' => '1',
429
+ 'sanitize_callback' => 'sanitize_text_field',
430
+
431
  ),
432
  array(
433
  'name' => 'ssb_uninstall_data',
440
  'desc' => '<h4> Facebook App</h4><a href="https://wpbrigade.com/how-to-create-facebook-app-and-get-app-id-and-secret/" target="_blank">how to make App</a>',
441
  'type' => 'ssb_text',
442
  'label' => __( 'Facebook App ID:', 'simple-social-buttons' ),
443
+ 'sanitize_callback' => 'sanitize_text_field',
444
+
445
  ),
446
  array(
447
  'name' => 'facebook_app_secret',
448
  'type' => 'ssb_text',
449
  'label' => __( 'Facebook App Secret:', 'simple-social-buttons' ),
450
+ 'sanitize_callback' => 'sanitize_text_field',
451
+
452
  ),
453
  array(
454
  'name' => 'ssb_css',
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://simplesocialbuttons.com/
4
  Tags: Social share, Social buttons, Whatsapp, Viber, LinkedIn, facebook, twitter, pinterest, plus one
5
  Requires at least: 4.0
6
  Tested up to: 5.8
7
- Stable tag: 3.2.3
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -147,6 +147,10 @@ like_button_size = small(default), large
147
 
148
  == Changelog ==
149
 
 
 
 
 
150
  = 3.2.3 - 2021-07-21 =
151
  * Bug fix: Sanitize the Social Media shortcode attributes.
152
  * Compatibility: Compatible with WordPress 5.8
@@ -458,5 +462,5 @@ like_button_size = small(default), large
458
 
459
  == Upgrade Notice ==
460
 
461
- = 3.2.3 =
462
- * Please upgrade immediately.
4
  Tags: Social share, Social buttons, Whatsapp, Viber, LinkedIn, facebook, twitter, pinterest, plus one
5
  Requires at least: 4.0
6
  Tested up to: 5.8
7
+ Stable tag: 3.2.4
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
147
 
148
  == Changelog ==
149
 
150
+ = 3.2.4 - 2021-09-07 =
151
+ * Bugfix: Sanitize the input fields.
152
+ * Enhancement: Added a filter `ssb_get_share_post` can be used to change the post that is shared.
153
+
154
  = 3.2.3 - 2021-07-21 =
155
  * Bug fix: Sanitize the Social Media shortcode attributes.
156
  * Compatibility: Compatible with WordPress 5.8
462
 
463
  == Upgrade Notice ==
464
 
465
+ = 3.2.4 =
466
+ * Please upgrade immediately.
simple-social-buttons.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Simple Social Buttons
4
  * Plugin URI: https://simplesocialbuttons.com/
5
  * Description: Simple Social Buttons adds an advanced set of social media sharing buttons to your WordPress sites, such as: Facebook, Twitter, WhatsApp, Viber, Reddit, LinkedIn and Pinterest. This makes it the most <code>Flexible Social Sharing Plugin ever for Everyone.</code>
6
- * Version: 3.2.3
7
  * Author: WPBrigade
8
  * Author URI: https://www.WPBrigade.com/
9
  * Text Domain: simple-social-buttons
@@ -44,7 +44,7 @@ class SimpleSocialButtonsPR {
44
  * @isnce
45
  * @var string
46
  */
47
- public $pluginVersion = '3.2.3';
48
 
49
  /**
50
  * Plugin Prefix
@@ -796,6 +796,7 @@ class SimpleSocialButtonsPR {
796
  return $content;
797
 
798
  }
 
799
  /**
800
  * Generate HTML code for specific order.
801
  *
@@ -806,17 +807,28 @@ class SimpleSocialButtonsPR {
806
  *
807
  * @access public
808
  * @since 1.0.0
 
809
  * @return string
810
  */
811
  public function generate_buttons_code( $order = null, $show_count = false, $show_total = false, $extra_data = array() ) {
812
 
813
  // define empty buttons code to use.
814
  $ssb_buttonscode = '';
815
- // get post permalink and title
816
- $permalink = get_permalink();
817
- $title = urlencode( html_entity_decode( get_the_title(), ENT_COMPAT, 'UTF-8' ) );
818
- $post_id = (int) get_the_id();
819
- $theme = isset( $extra_data['theme'] ) ? $extra_data['theme'] : $this->selected_theme;
 
 
 
 
 
 
 
 
 
 
820
 
821
  // Sorting the buttons
822
  $arrButtons = array();
3
  * Plugin Name: Simple Social Buttons
4
  * Plugin URI: https://simplesocialbuttons.com/
5
  * Description: Simple Social Buttons adds an advanced set of social media sharing buttons to your WordPress sites, such as: Facebook, Twitter, WhatsApp, Viber, Reddit, LinkedIn and Pinterest. This makes it the most <code>Flexible Social Sharing Plugin ever for Everyone.</code>
6
+ * Version: 3.2.4
7
  * Author: WPBrigade
8
  * Author URI: https://www.WPBrigade.com/
9
  * Text Domain: simple-social-buttons
44
  * @isnce
45
  * @var string
46
  */
47
+ public $pluginVersion = '3.2.4';
48
 
49
  /**
50
  * Plugin Prefix
796
  return $content;
797
 
798
  }
799
+
800
  /**
801
  * Generate HTML code for specific order.
802
  *
807
  *
808
  * @access public
809
  * @since 1.0.0
810
+ * @version 3.2.4
811
  * @return string
812
  */
813
  public function generate_buttons_code( $order = null, $show_count = false, $show_total = false, $extra_data = array() ) {
814
 
815
  // define empty buttons code to use.
816
  $ssb_buttonscode = '';
817
+ $post_id = (int) get_the_id();
818
+ $theme = isset( $extra_data['theme'] ) ? $extra_data['theme'] : $this->selected_theme;
819
+
820
+ /**
821
+ * 'ssb_get_share_post' can be used to change the post that is shared.
822
+ * @param int $post_id is the post ID
823
+ * @param $extra_data
824
+ *
825
+ * @since 3.2.4
826
+ */
827
+ $post_id = apply_filters( 'ssb_get_share_post', $post_id, $extra_data );
828
+
829
+ // get post permalink and title.
830
+ $permalink = get_permalink( $post_id );
831
+ $title = urlencode( html_entity_decode( get_the_title( $post_id ), ENT_COMPAT, 'UTF-8' ) );
832
 
833
  // Sorting the buttons
834
  $arrButtons = array();