Version Description
- Fix: Mobile disable option for Share Bar.
- Add: Ignore plugin Facebook SDK option.
Download this release
Release Info
Developer | DavidoffNeal |
Plugin | Simple Share Buttons Adder |
Version | 7.4.18 |
Comparing to | |
See all releases |
Code changes from version 7.4.17 to 7.4.18
- instance.php +1 -1
- php/class-admin-bits.php +8 -6
- php/class-admin-panel.php +22 -0
- php/class-database.php +6 -2
- php/class-styles.php +4 -3
- readme.txt +6 -2
- simple-share-buttons-adder.php +1 -1
- templates/classic-tab.php +5 -1
- templates/plus-tab.php +4 -0
instance.php
CHANGED
@@ -9,7 +9,7 @@ namespace SimpleShareButtonsAdder;
|
|
9 |
|
10 |
define( 'SSBA_FILE', __FILE__ );
|
11 |
define( 'SSBA_ROOT', dirname( __FILE__ ) );
|
12 |
-
define( 'SSBA_VERSION', '7.4.
|
13 |
|
14 |
global $simple_share_buttons_adder_plugin;
|
15 |
|
9 |
|
10 |
define( 'SSBA_FILE', __FILE__ );
|
11 |
define( 'SSBA_ROOT', dirname( __FILE__ ) );
|
12 |
+
define( 'SSBA_VERSION', '7.4.18' );
|
13 |
|
14 |
global $simple_share_buttons_adder_plugin;
|
15 |
|
php/class-admin-bits.php
CHANGED
@@ -381,9 +381,9 @@ class Admin_Bits {
|
|
381 |
'ssba_bar_icon_size' => $ssba_post['ssba_bar_icon_size'],
|
382 |
'ssba_bar_icon_color' => $ssba_post['ssba_bar_icon_color'],
|
383 |
'ssba_bar_icon_hover_color' => $ssba_post['ssba_bar_icon_hover_color'],
|
384 |
-
'ssba_bar_desktop' => isset( $ssba_post['ssba_bar_desktop'] )
|
385 |
'ssba_bar_margin' => $ssba_post['ssba_bar_margin'],
|
386 |
-
'ssba_bar_mobile' => isset( $ssba_post['ssba_bar_mobile'] )
|
387 |
'ssba_mobile_breakpoint' => $ssba_post['ssba_mobile_breakpoint'],
|
388 |
'ssba_custom_facebook' => $ssba_post['ssba_custom_facebook'],
|
389 |
'ssba_custom_google' => $ssba_post['ssba_custom_google'],
|
@@ -405,22 +405,24 @@ class Admin_Bits {
|
|
405 |
'ssba_custom_facebook_save' => $ssba_post['ssba_custom_facebook_save'],
|
406 |
|
407 |
// Shared count.
|
408 |
-
'sharedcount_enabled' => isset( $ssba_post['sharedcount_enabled'] )
|
409 |
'sharedcount_api_key' => $ssba_post['sharedcount_api_key'],
|
410 |
'sharedcount_plan' => $ssba_post['sharedcount_plan'],
|
411 |
|
412 |
// New share counts.
|
413 |
'twitter_newsharecounts' => $ssba_post['twitter_newsharecounts'],
|
414 |
'plus_twitter_newsharecounts' => $ssba_post['plus_twitter_newsharecounts'],
|
415 |
-
'bar_twitter_newsharecounts'
|
416 |
|
417 |
// Facebook.
|
418 |
'facebook_insights' => $ssba_post['facebook_insights'],
|
419 |
'facebook_app_id' => $ssba_post['facebook_app_id'],
|
|
|
420 |
'plus_facebook_insights' => $ssba_post['plus_facebook_insights'],
|
421 |
'plus_facebook_app_id' => $ssba_post['plus_facebook_app_id'],
|
422 |
-
'
|
423 |
-
'
|
|
|
424 |
);
|
425 |
|
426 |
// Save the settings.
|
381 |
'ssba_bar_icon_size' => $ssba_post['ssba_bar_icon_size'],
|
382 |
'ssba_bar_icon_color' => $ssba_post['ssba_bar_icon_color'],
|
383 |
'ssba_bar_icon_hover_color' => $ssba_post['ssba_bar_icon_hover_color'],
|
384 |
+
'ssba_bar_desktop' => isset( $ssba_post['ssba_bar_desktop'] ) ? $ssba_post['ssba_bar_desktop'] : 'N',
|
385 |
'ssba_bar_margin' => $ssba_post['ssba_bar_margin'],
|
386 |
+
'ssba_bar_mobile' => isset( $ssba_post['ssba_bar_mobile'] ) ? $ssba_post['ssba_bar_mobile'] : 'N',
|
387 |
'ssba_mobile_breakpoint' => $ssba_post['ssba_mobile_breakpoint'],
|
388 |
'ssba_custom_facebook' => $ssba_post['ssba_custom_facebook'],
|
389 |
'ssba_custom_google' => $ssba_post['ssba_custom_google'],
|
405 |
'ssba_custom_facebook_save' => $ssba_post['ssba_custom_facebook_save'],
|
406 |
|
407 |
// Shared count.
|
408 |
+
'sharedcount_enabled' => isset( $ssba_post['sharedcount_enabled'] ) ? $ssba_post['sharedcount_enabled'] : 'N',
|
409 |
'sharedcount_api_key' => $ssba_post['sharedcount_api_key'],
|
410 |
'sharedcount_plan' => $ssba_post['sharedcount_plan'],
|
411 |
|
412 |
// New share counts.
|
413 |
'twitter_newsharecounts' => $ssba_post['twitter_newsharecounts'],
|
414 |
'plus_twitter_newsharecounts' => $ssba_post['plus_twitter_newsharecounts'],
|
415 |
+
'bar_twitter_newsharecounts' => $ssba_post['bar_twitter_newsharecounts'],
|
416 |
|
417 |
// Facebook.
|
418 |
'facebook_insights' => $ssba_post['facebook_insights'],
|
419 |
'facebook_app_id' => $ssba_post['facebook_app_id'],
|
420 |
+
'ignore_facebook_sdk' => $ssba_post['ignore_facebook_sdk'],
|
421 |
'plus_facebook_insights' => $ssba_post['plus_facebook_insights'],
|
422 |
'plus_facebook_app_id' => $ssba_post['plus_facebook_app_id'],
|
423 |
+
'plus_ignore_facebook_sdk' => $ssba_post['plus_ignore_facebook_sdk'],
|
424 |
+
'bar_facebook_insights' => $ssba_post['bar_facebook_insights'],
|
425 |
+
'bar_facebook_app_id' => $ssba_post['bar_facebook_app_id'],
|
426 |
);
|
427 |
|
428 |
// Save the settings.
|
php/class-admin-panel.php
CHANGED
@@ -881,6 +881,17 @@ class Admin_Panel {
|
|
881 |
'disabled' => 'Y' !== $arr_settings['accepted_sharethis_terms'] ? 'disabled' : null,
|
882 |
);
|
883 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
884 |
// Facebook insights for plus.
|
885 |
$opts33p = array(
|
886 |
'form_group' => false,
|
@@ -893,6 +904,17 @@ class Admin_Panel {
|
|
893 |
'disabled' => 'Y' !== $arr_settings['accepted_sharethis_terms'] ? 'disabled' : null,
|
894 |
);
|
895 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
896 |
// Facebook insights for share bar.
|
897 |
$opts33s = array(
|
898 |
'form_group' => false,
|
881 |
'disabled' => 'Y' !== $arr_settings['accepted_sharethis_terms'] ? 'disabled' : null,
|
882 |
);
|
883 |
|
884 |
+
// Ignore sdk.
|
885 |
+
$ignore_sdk = array(
|
886 |
+
'form_group' => false,
|
887 |
+
'type' => 'checkbox',
|
888 |
+
'name' => 'ignore_facebook_sdk',
|
889 |
+
'label' => 'Ignore FB SDK',
|
890 |
+
'tooltip' => 'Using you\'re own Facebook SDK? Ignore ours.',
|
891 |
+
'value' => 'Y',
|
892 |
+
'checked' => isset( $arr_settings['ignore_facebook_sdk'] ) && 'Y' === $arr_settings['ignore_facebook_sdk'] ? esc_attr( 'checked' ) : '',
|
893 |
+
);
|
894 |
+
|
895 |
// Facebook insights for plus.
|
896 |
$opts33p = array(
|
897 |
'form_group' => false,
|
904 |
'disabled' => 'Y' !== $arr_settings['accepted_sharethis_terms'] ? 'disabled' : null,
|
905 |
);
|
906 |
|
907 |
+
// Plus ignore sdk.
|
908 |
+
$plus_ignore_sdk = array(
|
909 |
+
'form_group' => false,
|
910 |
+
'type' => 'checkbox',
|
911 |
+
'name' => 'plus_ignore_facebook_sdk',
|
912 |
+
'label' => 'Ignore FB SDK',
|
913 |
+
'tooltip' => 'Using you\'re own Facebook SDK? Ignore ours.',
|
914 |
+
'value' => 'Y',
|
915 |
+
'checked' => isset( $arr_settings['plus_ignore_facebook_sdk'] ) && 'Y' === $arr_settings['plus_ignore_facebook_sdk'] ? esc_attr( 'checked' ) : '',
|
916 |
+
);
|
917 |
+
|
918 |
// Facebook insights for share bar.
|
919 |
$opts33s = array(
|
920 |
'form_group' => false,
|
php/class-database.php
CHANGED
@@ -208,10 +208,12 @@ class Database {
|
|
208 |
// New with sharethis.
|
209 |
'facebook_insights' => '',
|
210 |
'facebook_app_id' => '',
|
|
|
211 |
'plus_facebook_insights' => '',
|
212 |
'plus_facebook_app_id' => '',
|
213 |
-
'
|
214 |
-
'
|
|
|
215 |
'accepted_sharethis_terms' => 'Y',
|
216 |
);
|
217 |
|
@@ -611,6 +613,8 @@ class Database {
|
|
611 |
delete_option( 'ssba_plus_font_weight' );
|
612 |
|
613 |
// Include.
|
|
|
|
|
614 |
delete_option( 'ssba_selected_buttons' );
|
615 |
delete_option( 'ssba_selected_share_buttons' );
|
616 |
delete_option( 'ssba_selected_plus_buttons' );
|
208 |
// New with sharethis.
|
209 |
'facebook_insights' => '',
|
210 |
'facebook_app_id' => '',
|
211 |
+
'ignore_facebook_sdk' => '',
|
212 |
'plus_facebook_insights' => '',
|
213 |
'plus_facebook_app_id' => '',
|
214 |
+
'plus_ignore_facebook_sdk' => '',
|
215 |
+
'share_facebook_insights' => '',
|
216 |
+
'share_facebook_app_id' => '',
|
217 |
'accepted_sharethis_terms' => 'Y',
|
218 |
);
|
219 |
|
613 |
delete_option( 'ssba_plus_font_weight' );
|
614 |
|
615 |
// Include.
|
616 |
+
delete_option( 'ignore_facebook_sdk' );
|
617 |
+
delete_option( 'plus_ignore_facebook_sdk' );
|
618 |
delete_option( 'ssba_selected_buttons' );
|
619 |
delete_option( 'ssba_selected_share_buttons' );
|
620 |
delete_option( 'ssba_selected_plus_buttons' );
|
php/class-styles.php
CHANGED
@@ -109,7 +109,7 @@ class Styles {
|
|
109 |
$arr_settings = $this->class_ssba->get_ssba_settings();
|
110 |
|
111 |
// If the sharethis terms have been accepted.
|
112 |
-
if ( 'Y' === $arr_settings['accepted_sharethis_terms'] ) {
|
113 |
// if a facebook app id has been set
|
114 |
if ( '' !== $arr_settings['facebook_app_id'] ) {
|
115 |
$src = '//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.6&appID=' . $arr_settings['facebook_app_id'];
|
@@ -183,7 +183,8 @@ class Styles {
|
|
183 |
$bar_button_hover = '' !== $arr_settings['ssba_bar_button_hover_color'] ? 'background-color: ' . $arr_settings['ssba_bar_button_hover_color'] . '!important;' : '';
|
184 |
$bar_icon_color = '' !== $arr_settings['ssba_bar_icon_color'] ? 'color: ' . $arr_settings['ssba_bar_icon_color'] . '!important;' : '';
|
185 |
$bar_icon_hover = '' !== $arr_settings['ssba_bar_icon_hover_color'] ? 'color: ' . $arr_settings['ssba_bar_icon_hover_color'] . '!important;' : '';
|
186 |
-
$bar_break_point = 'Y' !== $arr_settings['ssba_bar_mobile']
|
|
|
187 |
|
188 |
// Use set options.
|
189 |
$html_ssba_style = ' .ssba {
|
@@ -281,7 +282,7 @@ class Styles {
|
|
281 |
' . esc_html( $bar_margin ) . '
|
282 |
}';
|
283 |
|
284 |
-
$html_ssba_style .= '@media only screen and ( max-width: ' . $
|
285 |
#ssba-bar-2 {
|
286 |
' . $bar_break_point . '
|
287 |
}
|
109 |
$arr_settings = $this->class_ssba->get_ssba_settings();
|
110 |
|
111 |
// If the sharethis terms have been accepted.
|
112 |
+
if ( 'Y' === $arr_settings['accepted_sharethis_terms'] && ( ( 'Y' !== $arr_settings['ssba_new_buttons'] && 'Y' !== $arr_settings['ignore_facebook_sdk'] ) || ( 'Y' === $arr_settings['ssba_new_buttons'] && 'Y' !== $arr_settings['plus_ignore_facebook_sdk'] ) ) ) {
|
113 |
// if a facebook app id has been set
|
114 |
if ( '' !== $arr_settings['facebook_app_id'] ) {
|
115 |
$src = '//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.6&appID=' . $arr_settings['facebook_app_id'];
|
183 |
$bar_button_hover = '' !== $arr_settings['ssba_bar_button_hover_color'] ? 'background-color: ' . $arr_settings['ssba_bar_button_hover_color'] . '!important;' : '';
|
184 |
$bar_icon_color = '' !== $arr_settings['ssba_bar_icon_color'] ? 'color: ' . $arr_settings['ssba_bar_icon_color'] . '!important;' : '';
|
185 |
$bar_icon_hover = '' !== $arr_settings['ssba_bar_icon_hover_color'] ? 'color: ' . $arr_settings['ssba_bar_icon_hover_color'] . '!important;' : '';
|
186 |
+
$bar_break_point = 'Y' !== $arr_settings['ssba_bar_mobile'] ? 'display: none;' : 'display: block;';
|
187 |
+
$the_breakpoint = '' === $arr_settings['ssba_mobile_breakpoint'] || null === $arr_settings['ssba_mobile_breakpoint'] ? '750' : $arr_settings['ssba_mobile_breakpoint'];
|
188 |
|
189 |
// Use set options.
|
190 |
$html_ssba_style = ' .ssba {
|
282 |
' . esc_html( $bar_margin ) . '
|
283 |
}';
|
284 |
|
285 |
+
$html_ssba_style .= '@media only screen and ( max-width: ' . $the_breakpoint . 'px ) {
|
286 |
#ssba-bar-2 {
|
287 |
' . $bar_break_point . '
|
288 |
}
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: sharethis, scottstorebloom, surlyrightclick, DavidoffNeal
|
|
3 |
Tags: share buttons, social buttons, facebook, twitter, google+, share, share links, stumble upon, linkedin, pinterest, yummly, vk
|
4 |
Requires at least: 4.5
|
5 |
Tested up to: 4.9.5
|
6 |
-
Stable tag: 7.4.
|
7 |
License: GPLv2 or later
|
8 |
|
9 |
A simple plugin that enables you to add share buttons to all of your posts and/or pages.
|
@@ -66,7 +66,11 @@ Please visit the <a href="https://wordpress.org/support/plugin/simple-share-butt
|
|
66 |
|
67 |
== Changelog ==
|
68 |
|
69 |
-
= 7.4.
|
|
|
|
|
|
|
|
|
70 |
* Fix: Missing buttons on category pages.
|
71 |
* Fix: Styling issue causing background colors to break.
|
72 |
|
3 |
Tags: share buttons, social buttons, facebook, twitter, google+, share, share links, stumble upon, linkedin, pinterest, yummly, vk
|
4 |
Requires at least: 4.5
|
5 |
Tested up to: 4.9.5
|
6 |
+
Stable tag: 7.4.18
|
7 |
License: GPLv2 or later
|
8 |
|
9 |
A simple plugin that enables you to add share buttons to all of your posts and/or pages.
|
66 |
|
67 |
== Changelog ==
|
68 |
|
69 |
+
= 7.4.18 =
|
70 |
+
* Fix: Mobile disable option for Share Bar.
|
71 |
+
* Add: Ignore plugin Facebook SDK option.
|
72 |
+
|
73 |
+
= 7.4.17 =
|
74 |
* Fix: Missing buttons on category pages.
|
75 |
* Fix: Styling issue causing background colors to break.
|
76 |
|
simple-share-buttons-adder.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Simple Share Buttons Adder
|
4 |
* Plugin URI: https://simplesharebuttons.com
|
5 |
* Description: A simple plugin that enables you to add share buttons to all of your posts and/or pages.
|
6 |
-
* Version: 7.4.
|
7 |
* Author: Simple Share Buttons
|
8 |
* Author URI: https://simplesharebuttons.com
|
9 |
* License: GPLv2
|
3 |
* Plugin Name: Simple Share Buttons Adder
|
4 |
* Plugin URI: https://simplesharebuttons.com
|
5 |
* Description: A simple plugin that enables you to add share buttons to all of your posts and/or pages.
|
6 |
+
* Version: 7.4.18
|
7 |
* Author: Simple Share Buttons
|
8 |
* Author URI: https://simplesharebuttons.com
|
9 |
* License: GPLv2
|
templates/classic-tab.php
CHANGED
@@ -287,13 +287,17 @@
|
|
287 |
</div>
|
288 |
|
289 |
<div class="col-md-12">
|
290 |
-
<?php echo esc_html__( 'You
|
291 |
</div>
|
292 |
|
293 |
<div class="col-md-12">
|
294 |
<?php echo $this->forms->ssbp_input( $opts33 ); // WPCS: XSS ok.?>
|
295 |
</div>
|
296 |
|
|
|
|
|
|
|
|
|
297 |
<div class="col-md-12">
|
298 |
<?php echo esc_html__( 'You shall need have created and added a Facebook App ID above to make use of this feature', 'simple-share-buttons-adder' ); ?>
|
299 |
</div>
|
287 |
</div>
|
288 |
|
289 |
<div class="col-md-12">
|
290 |
+
<?php echo esc_html__( 'You need to follow the instructions here before enabling this feature', 'simple-share-buttons-adder' ); ?> - <a target="_blank" href="https://developers.facebook.com/docs/apps/register"><?php echo esc_html( 'https://developers.facebook.com/docs/apps/register' ); ?></a>
|
291 |
</div>
|
292 |
|
293 |
<div class="col-md-12">
|
294 |
<?php echo $this->forms->ssbp_input( $opts33 ); // WPCS: XSS ok.?>
|
295 |
</div>
|
296 |
|
297 |
+
<div class="col-md-12">
|
298 |
+
<?php echo $this->forms->ssbp_input( $ignore_sdk ); // WPCS: XSS ok.?>
|
299 |
+
</div>
|
300 |
+
|
301 |
<div class="col-md-12">
|
302 |
<?php echo esc_html__( 'You shall need have created and added a Facebook App ID above to make use of this feature', 'simple-share-buttons-adder' ); ?>
|
303 |
</div>
|
templates/plus-tab.php
CHANGED
@@ -228,6 +228,10 @@
|
|
228 |
<?php echo $this->forms->ssbp_input( $opts33p ); // WPCS: XSS ok.?>
|
229 |
</div>
|
230 |
|
|
|
|
|
|
|
|
|
231 |
<div class="col-md-12">
|
232 |
<?php echo esc_html__( 'You shall need have created and added a Facebook App ID above to make use of this feature', 'simple-share-buttons-adder' ); ?>
|
233 |
</div>
|
228 |
<?php echo $this->forms->ssbp_input( $opts33p ); // WPCS: XSS ok.?>
|
229 |
</div>
|
230 |
|
231 |
+
<div class="col-md-12">
|
232 |
+
<?php echo $this->forms->ssbp_input( $plus_ignore_sdk ); // WPCS: XSS ok.?>
|
233 |
+
</div>
|
234 |
+
|
235 |
<div class="col-md-12">
|
236 |
<?php echo esc_html__( 'You shall need have created and added a Facebook App ID above to make use of this feature', 'simple-share-buttons-adder' ); ?>
|
237 |
</div>
|