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

Version Description

  • 2022-01-07 =
  • Bugfix: YouTube follow button link.
  • Bugfix: Custom JS issue from frontend.
  • Bugfix: Sanitize Custom CSS/JS.
  • Enhancement: Added a filter ssb_sidebar_before_text can be used to add the text in sidebar social buttons.
  • Compatibility: Compatible with PHP 8.0
Download this release

Release Info

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

Code changes from version 3.2.4 to 4.0.0

assets/css/front.css CHANGED
@@ -2206,6 +2206,8 @@ div[class*="simplesocialbuttons-float"].simplesocialbuttons-fade-in{
2206
  }
2207
  .ssb-fb-like span{
2208
  vertical-align: middle !important;
 
 
2209
  }
2210
  .ssb-fb-like iframe{
2211
  visibility: inherit !important;
@@ -2522,6 +2524,10 @@ div[class*="simplesocialbuttons-float-left-post"] button .ssb_counter{
2522
  left: 0;
2523
  }
2524
 
 
 
 
 
2525
  /*----Hide sidebar-----*/
2526
 
2527
  .ssb-hide-floating-bar {
2206
  }
2207
  .ssb-fb-like span{
2208
  vertical-align: middle !important;
2209
+ right: 15px;
2210
+ margin-inline: 5px;
2211
  }
2212
  .ssb-fb-like iframe{
2213
  visibility: inherit !important;
2524
  left: 0;
2525
  }
2526
 
2527
+ .ssb_sidebar_heading_text{
2528
+ margin: 5px;
2529
+ }
2530
+
2531
  /*----Hide sidebar-----*/
2532
 
2533
  .ssb-hide-floating-bar {
assets/js/frontend-blocks.js ADDED
File without changes
classes/ssb-settings-strucutre.php CHANGED
@@ -327,6 +327,11 @@ if ( ! class_exists( 'Ssb_Settings_Structure' ) ) :
327
 
328
  }
329
 
 
 
 
 
 
330
  function callback_ssb_text( $args ) {
331
 
332
  $value = esc_attr( $this->get_option( $args['id'], $args['section'], $args['std'] ) );
@@ -335,18 +340,22 @@ if ( ! class_exists( 'Ssb_Settings_Structure' ) ) :
335
  $placeholder = empty( $args['placeholder'] ) ? '' : ' placeholder="' . $args['placeholder'] . '"';
336
  echo $args['desc']
337
  ?>
338
- <div class="<?php printf( 'simplesocial-form-section container-%1$s[%2$s]', $args['section'], $args['id'] ); ?>">
339
- <h5><?php echo $args['name']; ?></h5>
340
- <div class="simplesocial-input">
341
- <?php printf( '<input type="%1$s" class="%2$s-text" id="%3$s[%4$s]" name="%3$s[%4$s]" value="%5$s"%6$s/>', $type, $size, $args['section'], $args['id'], $value, $placeholder ); ?>
342
- <span class="highlight"></span>
343
- <span class="bar"></span>
344
-
345
- </div>
346
- </div>
347
  <?php
348
  }
349
 
 
 
 
 
 
350
  function callback_ssb_textarea( $args ) {
351
 
352
  $value = esc_textarea( $this->get_option( $args['id'], $args['section'], $args['std'] ) );
@@ -354,19 +363,41 @@ if ( ! class_exists( 'Ssb_Settings_Structure' ) ) :
354
  $placeholder = empty( $args['placeholder'] ) ? '' : ' placeholder="' . $args['placeholder'] . '"';
355
 
356
  ?>
357
- <div class="simplesocial-form-section">
358
- <h5><?php echo $args['name']; ?></h5>
359
- <div class="simplesocial-input">
360
- <?php printf( '<textarea rows="5" cols="55" class="%1$s-text" id="%2$s[%3$s]" name="%2$s[%3$s]"%4$s>%5$s</textarea>', $size, $args['section'], $args['id'], $placeholder, $value ); ?>
361
- <span class="highlight"></span>
362
- <span class="bar"></span>
363
- </div>
364
- </div>
 
 
 
 
 
365
  <?php
366
 
367
  }
368
 
369
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
370
  function callback_ssb_icon_selection( $args ) {
371
 
372
  $save_value = esc_textarea( $this->get_option( $args['id'], $args['section'], $args['std'] ) );
@@ -383,7 +414,7 @@ if ( ! class_exists( 'Ssb_Settings_Structure' ) ) :
383
  $ssb_icons_order = array();
384
  $arrKnownButtons = array( 'twitter', 'pinterest', 'fbshare', 'linkedin', 'reddit', 'whatsapp', 'viber', 'fblike', 'messenger', 'email', 'print', 'tumblr' );
385
  foreach ( $arrKnownButtons as $button_name ) {
386
- $ssb_icons_order[ $button_name ] = isset( $settings[ $button_name ] ) ? $settings[ $button_name ] : '';
387
  }
388
 
389
  asort( $ssb_icons_order );
327
 
328
  }
329
 
330
+ /**
331
+ * Create a callback for text.
332
+ *
333
+ * @version 4.0.0
334
+ */
335
  function callback_ssb_text( $args ) {
336
 
337
  $value = esc_attr( $this->get_option( $args['id'], $args['section'], $args['std'] ) );
340
  $placeholder = empty( $args['placeholder'] ) ? '' : ' placeholder="' . $args['placeholder'] . '"';
341
  echo $args['desc']
342
  ?>
343
+ <div class="<?php printf( 'simplesocial-form-section container-%1$s[%2$s]', $args['section'], $args['id'] ); ?>">
344
+ <h5><?php echo $args['name']; ?></h5>
345
+ <div class="simplesocial-input">
346
+ <?php printf( '<input type="%1$s" class="%2$s-text" id="%3$s[%4$s]" name="%3$s[%4$s]" value="%5$s"%6$s/>', $type, $size, $args['section'], $args['id'], $value, $placeholder ); ?>
347
+ <span class="highlight"></span>
348
+ <span class="bar"></span>
349
+ </div>
350
+ </div>
 
351
  <?php
352
  }
353
 
354
+ /**
355
+ * Create a callback for textarea.
356
+ *
357
+ * @version 4.0.0
358
+ */
359
  function callback_ssb_textarea( $args ) {
360
 
361
  $value = esc_textarea( $this->get_option( $args['id'], $args['section'], $args['std'] ) );
363
  $placeholder = empty( $args['placeholder'] ) ? '' : ' placeholder="' . $args['placeholder'] . '"';
364
 
365
  ?>
366
+ <div class="simplesocial-form-section">
367
+ <h5><?php echo $args['name']; ?></h5>
368
+ <div class="simplesocial-input">
369
+ <?php
370
+ if ( 'ssb_js' === $args['id'] ) {
371
+ printf( '<textarea rows="5" cols="55" class="%1$s-text" id="%2$s[%3$s]" name="%2$s[%3$s]"%4$s>%5$s</textarea>', $size, $args['section'], $args['id'], $placeholder, $this->ssb_escape_js_output( $value ) );
372
+ } else {
373
+ printf( '<textarea rows="5" cols="55" class="%1$s-text" id="%2$s[%3$s]" name="%2$s[%3$s]"%4$s>%5$s</textarea>', $size, $args['section'], $args['id'], $placeholder, $this->ssb_escape_output( $value ) );
374
+ } ?>
375
+ <span class="highlight"></span>
376
+ <span class="bar"></span>
377
+ </div>
378
+ </div>
379
  <?php
380
 
381
  }
382
 
383
 
384
+ /**
385
+ * The JS Output Escaping
386
+ * @since 4.0.0
387
+ */
388
+ public function ssb_escape_js_output( $input ) {
389
+ return base64_decode( $input );
390
+ }
391
+
392
+ /**
393
+ * The CSS Output Escaping
394
+ * @since 4.0.0
395
+ */
396
+ public function ssb_escape_output( $input ) {
397
+ return $input;
398
+
399
+ }
400
+
401
  function callback_ssb_icon_selection( $args ) {
402
 
403
  $save_value = esc_textarea( $this->get_option( $args['id'], $args['section'], $args['std'] ) );
414
  $ssb_icons_order = array();
415
  $arrKnownButtons = array( 'twitter', 'pinterest', 'fbshare', 'linkedin', 'reddit', 'whatsapp', 'viber', 'fblike', 'messenger', 'email', 'print', 'tumblr' );
416
  foreach ( $arrKnownButtons as $button_name ) {
417
+ $ssb_icons_order[ $button_name ] = isset( $settings[ $button_name ] ) ? $settings[ $button_name ] : 0;
418
  }
419
 
420
  asort( $ssb_icons_order );
classes/ssb-settings.php CHANGED
@@ -448,17 +448,20 @@ class Ssb_Settings {
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',
455
  'label' => __( 'Custom CSS', 'simple-social-buttons-pro' ),
456
  'type' => 'ssb_textarea',
 
 
457
  ),
458
  array(
459
  'name' => 'ssb_js',
460
  'label' => __( 'Custom JS', 'simple-social-buttons-pro' ),
461
  'type' => 'ssb_textarea',
 
462
  ),
463
  ),
464
  );
@@ -468,6 +471,29 @@ class Ssb_Settings {
468
  return $settings_fields;
469
  }
470
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
471
  function plugin_page() {
472
  echo '<div class="wrap">';
473
  $this->settings_api->settings_header();
@@ -477,11 +503,11 @@ class Ssb_Settings {
477
  echo '</div>';
478
  }
479
 
480
- /**
481
- * Get all the pages
482
- *
483
- * @return array page names with key value pairs
484
- */
485
  function get_pages() {
486
  $pages = get_pages();
487
  $pages_options = array();
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',
455
  'label' => __( 'Custom CSS', 'simple-social-buttons-pro' ),
456
  'type' => 'ssb_textarea',
457
+ 'sanitize_callback' => array( $this, 'ssb_sanitize_css_code' ),
458
+
459
  ),
460
  array(
461
  'name' => 'ssb_js',
462
  'label' => __( 'Custom JS', 'simple-social-buttons-pro' ),
463
  'type' => 'ssb_textarea',
464
+ 'sanitize_callback' => array( $this, 'ssb_sanitize_code' ),
465
  ),
466
  ),
467
  );
471
  return $settings_fields;
472
  }
473
 
474
+ /**
475
+ * Sanitize input sanitization function
476
+ *
477
+ * @param string $input The code input to sanitize.
478
+ * @since 4.0.0
479
+ *
480
+ * @return $input the sanitized value.
481
+ */
482
+ public function ssb_sanitize_code( $input ) {
483
+ return base64_encode( $input );
484
+ }
485
+
486
+ /**
487
+ * Sanitize input sanitization function
488
+ *
489
+ * @param string $input The code input to sanitize.
490
+ * @since 4.0.0
491
+ *
492
+ * @return $input the sanitized value.
493
+ */
494
+ public function ssb_sanitize_css_code( $input ) {
495
+ return wp_strip_all_tags( $input );
496
+ }
497
  function plugin_page() {
498
  echo '<div class="wrap">';
499
  $this->settings_api->settings_header();
503
  echo '</div>';
504
  }
505
 
506
+ /**
507
+ * Get all the pages
508
+ *
509
+ * @return array page names with key value pairs
510
+ */
511
  function get_pages() {
512
  $pages = get_pages();
513
  $pages_options = array();
inc/custom-css.php CHANGED
@@ -95,12 +95,5 @@
95
  margin: <?php echo $this->sidebar_option['icon_space'] == '1' && $this->sidebar_option['icon_space_value'] != '' ? $this->sidebar_option['icon_space_value'] . 'px 0' : ''; ?>;
96
  }
97
  <?php endif ?>
98
- <?php
99
-
100
- if( isset( $this->extra_option['ssb_css'] ) && ! empty( $this->extra_option['ssb_css'] ) ){
101
- esc_attr_e( $this->extra_option['ssb_css'] );
102
- }
103
-
104
- ?>
105
 
106
  </style>
95
  margin: <?php echo $this->sidebar_option['icon_space'] == '1' && $this->sidebar_option['icon_space_value'] != '' ? $this->sidebar_option['icon_space_value'] . 'px 0' : ''; ?>;
96
  }
97
  <?php endif ?>
 
 
 
 
 
 
 
98
 
99
  </style>
inc/ssb-widget-fields.php CHANGED
@@ -100,7 +100,7 @@
100
  <p>
101
  <label for="<?php echo esc_attr( $this->get_field_id( 'youtube_type' ) ); ?> "><?php esc_attr_e( 'Type :', 'simple-social-buttons' ); ?></label>
102
  <select class="widefat" name="<?php echo esc_attr( $this->get_field_name( 'youtube_type' ) ); ?>">
103
- <option <?php selected( $youtube_type, 'channel'); ?> value="c">Channel</option>
104
  <option <?php selected( $youtube_type, 'user'); ?> value="user">Username</option>
105
  </select>
106
  </p>
100
  <p>
101
  <label for="<?php echo esc_attr( $this->get_field_id( 'youtube_type' ) ); ?> "><?php esc_attr_e( 'Type :', 'simple-social-buttons' ); ?></label>
102
  <select class="widefat" name="<?php echo esc_attr( $this->get_field_name( 'youtube_type' ) ); ?>">
103
+ <option <?php selected( $youtube_type, 'channel'); ?> value="channel">Channel</option>
104
  <option <?php selected( $youtube_type, 'user'); ?> value="user">Username</option>
105
  </select>
106
  </p>
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Simple Social Media Share Buttons - Social Sharing for Everyone ===
2
  Contributors: hiddenpearls, WPBrigade, desideveloper
3
- 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.4
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -147,6 +147,13 @@ like_button_size = small(default), large
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.
@@ -462,5 +469,5 @@ like_button_size = small(default), large
462
 
463
  == Upgrade Notice ==
464
 
465
- = 3.2.4 =
466
- * Please upgrade immediately.
1
  === Simple Social Media Share Buttons - Social Sharing for Everyone ===
2
  Contributors: hiddenpearls, WPBrigade, desideveloper
3
+ Donate link: https://simplesocialbuttons.com/?utm_source=simple-social-buttons-lite&utm_medium=donate-link
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: 4.0.0
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
147
 
148
  == Changelog ==
149
 
150
+ = 4.0.0 - 2022-01-07 =
151
+ * Bugfix: YouTube follow button link.
152
+ * Bugfix: Custom JS issue from frontend.
153
+ * Bugfix: Sanitize Custom CSS/JS.
154
+ * Enhancement: Added a filter `ssb_sidebar_before_text` can be used to add the text in sidebar social buttons.
155
+ * Compatibility: Compatible with PHP 8.0
156
+
157
  = 3.2.4 - 2021-09-07 =
158
  * Bugfix: Sanitize the input fields.
159
  * Enhancement: Added a filter `ssb_get_share_post` can be used to change the post that is shared.
469
 
470
  == Upgrade Notice ==
471
 
472
+ = 4.0.0 =
473
+ * Please upgrade immediately - Simple Social Buttons major release.
simple-social-buttons.php CHANGED
@@ -1,11 +1,11 @@
1
  <?php
2
  /**
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
10
  * Domain Path: /lang
11
  */
@@ -44,7 +44,7 @@ class SimpleSocialButtonsPR {
44
  * @isnce
45
  * @var string
46
  */
47
- public $pluginVersion = '3.2.4';
48
 
49
  /**
50
  * Plugin Prefix
@@ -485,6 +485,7 @@ class SimpleSocialButtonsPR {
485
  *
486
  * @access public
487
  * @since 1.0.0
 
488
  * @return void
489
  */
490
  public function front_enqueue_scripts() {
@@ -492,6 +493,11 @@ class SimpleSocialButtonsPR {
492
  wp_enqueue_script( 'jquery' );
493
  wp_enqueue_script( 'ssb-front-js', plugins_url( 'assets/js/front.js', __FILE__ ), array( 'jquery' ), SSB_VERSION );
494
  wp_enqueue_style( 'ssb-front-css', plugins_url( 'assets/css/front.css', __FILE__ ), false, SSB_VERSION );
 
 
 
 
 
495
  wp_localize_script(
496
  'ssb-front-js',
497
  'SSB',
@@ -509,11 +515,10 @@ class SimpleSocialButtonsPR {
509
  * @return void
510
  */
511
  public function front_block_scripts() {
512
- // wp_enqueue_script( 'ssb-blocks-front-js', plugins_url( 'assets/js/blocks.frontend.js', __FILE__ ), array(), SSB_VERSION );
513
- // wp_enqueue_style( 'ssb-blocks-front-css', plugins_url( 'assets/css/blocks.style.css', __FILE__ ), array(), SSB_VERSION );
514
 
515
  if ( isset( $this->extra_option['ssb_js'] ) && ! empty( $this->extra_option['ssb_js'] ) ) {
516
- wp_add_inline_script( 'ssb-blocks-front-js', $this->extra_option['ssb_js'] );
517
  }
518
  }
519
 
@@ -918,15 +923,23 @@ class SimpleSocialButtonsPR {
918
  * @param array $show_count all network share counts.
919
  */
920
  $arrButtons = apply_filters( 'ssb_active_network', $arrButtons, $share_counts, $extra_data );
 
 
 
 
 
 
921
 
922
  $arrButtonsCode = array();
923
  foreach ( $arrButtons as $button_name => $button_sort ) {
 
924
  switch ( $button_name ) {
 
925
  case 'fbshare':
926
  $fbshare_share = $share_counts['fbshare'] ? $share_counts['fbshare'] : 0;
927
 
928
  if ( $theme == 'simple-icons' ) {
929
- $_html = ' <button class="ssb_fbshare-icon" target="_blank" data-href="https://www.facebook.com/sharer/sharer.php?u=' . $permalink . '" onclick="javascript:window.open(this.dataset.href, \'\', \'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600\');return false;">
930
  <span class="icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="_1pbq" color="#ffffff"><path fill="#ffffff" fill-rule="evenodd" class="icon" d="M8 14H3.667C2.733 13.9 2 13.167 2 12.233V3.667A1.65 1.65 0 0 1 3.667 2h8.666A1.65 1.65 0 0 1 14 3.667v8.566c0 .934-.733 1.667-1.667 1.767H10v-3.967h1.3l.7-2.066h-2V6.933c0-.466.167-.9.867-.9H12v-1.8c.033 0-.933-.266-1.533-.266-1.267 0-2.434.7-2.467 2.133v1.867H6v2.066h2V14z"></path></svg></span>
931
  <span class="simplesocialtxt">Share </span>';
932
 
@@ -1260,11 +1273,21 @@ class SimpleSocialButtonsPR {
1260
  }
1261
 
1262
  $class .= ' simplesocialbuttons-slide-' . $this->_get_settings( 'sidebar', 'animation', 'no-animation' );
 
 
 
1263
  $_selected_network = apply_filters( 'ssb_sidebar_social_networks', $this->selected_networks );
 
 
 
 
 
1264
  $extra_data = array(
1265
- 'class' => $class,
1266
- 'position' => 'sidebar',
 
1267
  );
 
1268
  echo $this->generate_buttons_code( $_selected_network, $show_count, $show_total, $extra_data );
1269
  }
1270
  }
1
  <?php
2
  /**
3
  * Plugin Name: Simple Social Buttons
4
+ * Plugin URI: https://simplesocialbuttons.com/?utm_source=loginpress-lite&utm_medium=plugin-url-link
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: 4.0.0
7
  * Author: WPBrigade
8
+ * Author URI: https://www.WPBrigade.com/?utm_source=simple-social-buttons-lite&utm_medium=author-url-link
9
  * Text Domain: simple-social-buttons
10
  * Domain Path: /lang
11
  */
44
  * @isnce
45
  * @var string
46
  */
47
+ public $pluginVersion = '4.0.0';
48
 
49
  /**
50
  * Plugin Prefix
485
  *
486
  * @access public
487
  * @since 1.0.0
488
+ * @version 4.0.0
489
  * @return void
490
  */
491
  public function front_enqueue_scripts() {
493
  wp_enqueue_script( 'jquery' );
494
  wp_enqueue_script( 'ssb-front-js', plugins_url( 'assets/js/front.js', __FILE__ ), array( 'jquery' ), SSB_VERSION );
495
  wp_enqueue_style( 'ssb-front-css', plugins_url( 'assets/css/front.css', __FILE__ ), false, SSB_VERSION );
496
+
497
+ if ( isset( $this->extra_option['ssb_css'] ) && ! empty( $this->extra_option['ssb_css'] ) ) {
498
+ wp_add_inline_style( 'ssb-front-css', $this->extra_option['ssb_css'] );
499
+ }
500
+
501
  wp_localize_script(
502
  'ssb-front-js',
503
  'SSB',
515
  * @return void
516
  */
517
  public function front_block_scripts() {
518
+ wp_enqueue_script( 'ssb-blocks-front-js', plugins_url( 'assets/js/frontend-blocks.js', __FILE__ ), array(), SSB_VERSION );
 
519
 
520
  if ( isset( $this->extra_option['ssb_js'] ) && ! empty( $this->extra_option['ssb_js'] ) ) {
521
+ wp_add_inline_script( 'ssb-blocks-front-js', strip_tags( base64_decode( $this->extra_option['ssb_js'] ) ) );
522
  }
523
  }
524
 
923
  * @param array $show_count all network share counts.
924
  */
925
  $arrButtons = apply_filters( 'ssb_active_network', $arrButtons, $share_counts, $extra_data );
926
+ $_html = '';
927
+
928
+ // Add The heading text.
929
+ if ( 'sidebar' === $extra_data['position'] && ( ! empty( $extra_data['before_text'] ) ) ) {
930
+ $_html .= '<h4 class="ssb_sidebar_heading_text">' . $extra_data['before_text'] . '</h4>';
931
+ }
932
 
933
  $arrButtonsCode = array();
934
  foreach ( $arrButtons as $button_name => $button_sort ) {
935
+
936
  switch ( $button_name ) {
937
+
938
  case 'fbshare':
939
  $fbshare_share = $share_counts['fbshare'] ? $share_counts['fbshare'] : 0;
940
 
941
  if ( $theme == 'simple-icons' ) {
942
+ $_html .= ' <button class="ssb_fbshare-icon" target="_blank" data-href="https://www.facebook.com/sharer/sharer.php?u=' . $permalink . '" onclick="javascript:window.open(this.dataset.href, \'\', \'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600\');return false;">
943
  <span class="icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="_1pbq" color="#ffffff"><path fill="#ffffff" fill-rule="evenodd" class="icon" d="M8 14H3.667C2.733 13.9 2 13.167 2 12.233V3.667A1.65 1.65 0 0 1 3.667 2h8.666A1.65 1.65 0 0 1 14 3.667v8.566c0 .934-.733 1.667-1.667 1.767H10v-3.967h1.3l.7-2.066h-2V6.933c0-.466.167-.9.867-.9H12v-1.8c.033 0-.933-.266-1.533-.266-1.267 0-2.434.7-2.467 2.133v1.867H6v2.066h2V14z"></path></svg></span>
944
  <span class="simplesocialtxt">Share </span>';
945
 
1273
  }
1274
 
1275
  $class .= ' simplesocialbuttons-slide-' . $this->_get_settings( 'sidebar', 'animation', 'no-animation' );
1276
+ /**
1277
+ * The filter to modify Selected Networks of SSB in sidebar.
1278
+ */
1279
  $_selected_network = apply_filters( 'ssb_sidebar_social_networks', $this->selected_networks );
1280
+ /**
1281
+ * The filter to add heading text in SSB sidebar.
1282
+ */
1283
+ $before_text = apply_filters( 'ssb_sidebar_before_text', false );
1284
+
1285
  $extra_data = array(
1286
+ 'class' => $class,
1287
+ 'position' => 'sidebar',
1288
+ 'before_text' => sanitize_text_field( $before_text ),
1289
  );
1290
+
1291
  echo $this->generate_buttons_code( $_selected_network, $show_count, $show_total, $extra_data );
1292
  }
1293
  }