Version Description
- Fix: Sharedcount.com settings save issue.
- Fix: sharedcount missing index error fix.
- Fix: Remove deprecated create_function and replace with new widget registering method.
Download this release
Release Info
Developer | DavidoffNeal |
Plugin | Simple Share Buttons Adder |
Version | 7.4.16 |
Comparing to | |
See all releases |
Code changes from version 7.4.15 to 7.4.16
- instance.php +1 -1
- js/admin.js +1 -0
- php/class-admin-bits.php +1 -7
- php/class-admin-panel.php +92 -1
- php/class-buttons.php +2 -2
- php/class-plugin.php +3 -3
- php/class-widget.php +0 -3
- readme.txt +7 -2
- simple-share-buttons-adder.php +1 -1
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.16' );
|
13 |
|
14 |
global $simple_share_buttons_adder_plugin;
|
15 |
|
js/admin.js
CHANGED
@@ -883,6 +883,7 @@ var SimpleShareButtonsAdder = ( function( $, wp ) {
|
|
883 |
* @param type
|
884 |
*/
|
885 |
dismissNotice: function( type ){
|
|
|
886 |
// Send newsletter id to the test function.
|
887 |
wp.ajax.post( 'dismiss_notice', {
|
888 |
type: type,
|
883 |
* @param type
|
884 |
*/
|
885 |
dismissNotice: function( type ){
|
886 |
+
|
887 |
// Send newsletter id to the test function.
|
888 |
wp.ajax.post( 'dismiss_notice', {
|
889 |
type: type,
|
php/class-admin-bits.php
CHANGED
@@ -405,15 +405,9 @@ class Admin_Bits {
|
|
405 |
'ssba_custom_facebook_save' => $ssba_post['ssba_custom_facebook_save'],
|
406 |
|
407 |
// Shared count.
|
408 |
-
'sharedcount_enabled' => $ssba_post['sharedcount_enabled'],
|
409 |
'sharedcount_api_key' => $ssba_post['sharedcount_api_key'],
|
410 |
'sharedcount_plan' => $ssba_post['sharedcount_plan'],
|
411 |
-
'plus_sharedcount_enabled' => $ssba_post['plus_sharedcount_enabled'],
|
412 |
-
'plus_sharedcount_api_key' => $ssba_post['plus_sharedcount_api_key'],
|
413 |
-
'plus_sharedcount_plan' => $ssba_post['plus_sharedcount_plan'],
|
414 |
-
'bar_sharedcount_enabled' => $ssba_post['bar_sharedcount_enabled'],
|
415 |
-
'bar_sharedcount_api_key' => $ssba_post['bar_sharedcount_api_key'],
|
416 |
-
'bar_sharedcount_plan' => $ssba_post['bar_sharedcount_plan'],
|
417 |
|
418 |
// New share counts.
|
419 |
'twitter_newsharecounts' => $ssba_post['twitter_newsharecounts'],
|
405 |
'ssba_custom_facebook_save' => $ssba_post['ssba_custom_facebook_save'],
|
406 |
|
407 |
// Shared count.
|
408 |
+
'sharedcount_enabled' => isset( $ssba_post['sharedcount_enabled'] ) && 'Y' === $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'],
|
php/class-admin-panel.php
CHANGED
@@ -28,6 +28,13 @@ class Admin_Panel {
|
|
28 |
*/
|
29 |
public $class_ssba;
|
30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
/**
|
32 |
* Forms instance.
|
33 |
*
|
@@ -42,10 +49,11 @@ class Admin_Panel {
|
|
42 |
* @param object $class_ssba Simple Share Buttons Adder instance.
|
43 |
* @param object $forms Forms instance.
|
44 |
*/
|
45 |
-
public function __construct( $plugin, $class_ssba, $forms ) {
|
46 |
$this->plugin = $plugin;
|
47 |
$this->class_ssba = $class_ssba;
|
48 |
$this->forms = $forms;
|
|
|
49 |
}
|
50 |
|
51 |
/**
|
@@ -597,6 +605,80 @@ class Admin_Panel {
|
|
597 |
'value' => isset( $arr_settings['sharedcount_api_key'] ) ? $arr_settings['sharedcount_api_key'] : '',
|
598 |
);
|
599 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
600 |
// Link to ssb.
|
601 |
$opts26 = array(
|
602 |
'form_group' => false,
|
@@ -1680,4 +1762,13 @@ class Admin_Panel {
|
|
1680 |
|
1681 |
wp_add_inline_style( "{$this->plugin->assets_prefix}-admin-theme", $html_share_buttons_form );
|
1682 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1683 |
}
|
28 |
*/
|
29 |
public $class_ssba;
|
30 |
|
31 |
+
/**
|
32 |
+
* Widget Class instance.
|
33 |
+
*
|
34 |
+
* @var object
|
35 |
+
*/
|
36 |
+
public $widget_class;
|
37 |
+
|
38 |
/**
|
39 |
* Forms instance.
|
40 |
*
|
49 |
* @param object $class_ssba Simple Share Buttons Adder instance.
|
50 |
* @param object $forms Forms instance.
|
51 |
*/
|
52 |
+
public function __construct( $plugin, $class_ssba, $forms, $widget_class ) {
|
53 |
$this->plugin = $plugin;
|
54 |
$this->class_ssba = $class_ssba;
|
55 |
$this->forms = $forms;
|
56 |
+
$this->widget_class = $widget_class;
|
57 |
}
|
58 |
|
59 |
/**
|
605 |
'value' => isset( $arr_settings['sharedcount_api_key'] ) ? $arr_settings['sharedcount_api_key'] : '',
|
606 |
);
|
607 |
|
608 |
+
// Sharedcount enable.
|
609 |
+
$opts23p = array(
|
610 |
+
'form_group' => false,
|
611 |
+
'type' => 'checkbox',
|
612 |
+
'name' => 'plus_sharedcount_enabled',
|
613 |
+
'label' => 'Enable sharedcount.com API',
|
614 |
+
'tooltip' => 'Enable if you wish to enable the use of the sharedcount.com API',
|
615 |
+
'value' => 'Y',
|
616 |
+
'checked' => isset( $arr_settings['plus_sharedcount_enabled'] ) && 'Y' === $arr_settings['plus_sharedcount_enabled'] ? esc_attr( 'checked' ) : null,
|
617 |
+
);
|
618 |
+
|
619 |
+
// Sharedcount plan.
|
620 |
+
$opts24p = array(
|
621 |
+
'form_group' => false,
|
622 |
+
'type' => 'select',
|
623 |
+
'name' => 'plus_sharedcount_plan',
|
624 |
+
'label' => 'sharedcount.com plan',
|
625 |
+
'tooltip' => 'Select your sharedcount.com plan',
|
626 |
+
'selected' => isset( $arr_settings['plus_sharedcount_plan'] ) ? $arr_settings['plus_sharedcount_plan'] : '',
|
627 |
+
'options' => array(
|
628 |
+
'Free' => 'free',
|
629 |
+
'Plus' => 'plus',
|
630 |
+
'Business' => 'business',
|
631 |
+
),
|
632 |
+
);
|
633 |
+
|
634 |
+
// Sharedcount api key.
|
635 |
+
$opts25p = array(
|
636 |
+
'form_group' => false,
|
637 |
+
'type' => 'text',
|
638 |
+
'placeholder' => '9b17c12712c691491ef95f46c51ce3917118fdf9',
|
639 |
+
'name' => 'plus_sharedcount_api_key',
|
640 |
+
'label' => 'sharedcount.com API Key',
|
641 |
+
'tooltip' => 'Add some text included in an email when people share that way',
|
642 |
+
'value' => isset( $arr_settings['plus_sharedcount_api_key'] ) ? $arr_settings['plus_sharedcount_api_key'] : '',
|
643 |
+
);
|
644 |
+
|
645 |
+
// Sharedcount enable.
|
646 |
+
$opts23b = array(
|
647 |
+
'form_group' => false,
|
648 |
+
'type' => 'checkbox',
|
649 |
+
'name' => 'bar_sharedcount_enabled',
|
650 |
+
'label' => 'Enable sharedcount.com API',
|
651 |
+
'tooltip' => 'Enable if you wish to enable the use of the sharedcount.com API',
|
652 |
+
'value' => 'Y',
|
653 |
+
'checked' => isset( $arr_settings['bar_sharedcount_enabled'] ) && 'Y' === $arr_settings['bar_sharedcount_enabled'] ? esc_attr( 'checked' ) : null,
|
654 |
+
);
|
655 |
+
|
656 |
+
// Sharedcount plan.
|
657 |
+
$opts24b = array(
|
658 |
+
'form_group' => false,
|
659 |
+
'type' => 'select',
|
660 |
+
'name' => 'bar_sharedcount_plan',
|
661 |
+
'label' => 'sharedcount.com plan',
|
662 |
+
'tooltip' => 'Select your sharedcount.com plan',
|
663 |
+
'selected' => isset( $arr_settings['bar_sharedcount_plan'] ) ? $arr_settings['bar_sharedcount_plan'] : '',
|
664 |
+
'options' => array(
|
665 |
+
'Free' => 'free',
|
666 |
+
'Plus' => 'plus',
|
667 |
+
'Business' => 'business',
|
668 |
+
),
|
669 |
+
);
|
670 |
+
|
671 |
+
// Sharedcount api key.
|
672 |
+
$opts25b = array(
|
673 |
+
'form_group' => false,
|
674 |
+
'type' => 'text',
|
675 |
+
'placeholder' => '9b17c12712c691491ef95f46c51ce3917118fdf9',
|
676 |
+
'name' => 'bar_sharedcount_api_key',
|
677 |
+
'label' => 'sharedcount.com API Key',
|
678 |
+
'tooltip' => 'Add some text included in an email when people share that way',
|
679 |
+
'value' => isset( $arr_settings['bar_sharedcount_api_key'] ) ? $arr_settings['bar_sharedcount_api_key'] : '',
|
680 |
+
);
|
681 |
+
|
682 |
// Link to ssb.
|
683 |
$opts26 = array(
|
684 |
'form_group' => false,
|
1762 |
|
1763 |
wp_add_inline_style( "{$this->plugin->assets_prefix}-admin-theme", $html_share_buttons_form );
|
1764 |
}
|
1765 |
+
|
1766 |
+
/**
|
1767 |
+
* Register button widget.
|
1768 |
+
*
|
1769 |
+
* @action widgets_init
|
1770 |
+
*/
|
1771 |
+
public function register_widget() {
|
1772 |
+
register_widget( $this->widget_class );
|
1773 |
+
}
|
1774 |
}
|
php/class-buttons.php
CHANGED
@@ -667,9 +667,9 @@ class Buttons {
|
|
667 |
// If sharedcount.com is enabled.
|
668 |
if ( ( ( 'Y' === $arr_settings['sharedcount_enabled'] && 'Y' !== $arr_settings['ssba_new_buttons'] )
|
669 |
||
|
670 |
-
( 'Y' === $arr_settings['
|
671 |
||
|
672 |
-
( 'Y' === $arr_settings['
|
673 |
)
|
674 |
) ) {
|
675 |
|
667 |
// If sharedcount.com is enabled.
|
668 |
if ( ( ( 'Y' === $arr_settings['sharedcount_enabled'] && 'Y' !== $arr_settings['ssba_new_buttons'] )
|
669 |
||
|
670 |
+
( 'Y' === $arr_settings['plus_sharedcount_enabled'] && 'Y' === $arr_settings['ssba_new_buttons'] )
|
671 |
||
|
672 |
+
( 'Y' === $arr_settings['bar_sharedcount_enabled'] && isset( $arr_settings['bar_call'] )
|
673 |
)
|
674 |
) ) {
|
675 |
|
php/class-plugin.php
CHANGED
@@ -26,19 +26,19 @@ class Plugin extends Plugin_Base {
|
|
26 |
$class_ssba = new Simple_Share_Buttons_Adder( $this );
|
27 |
$database = new Database( $this, $class_ssba );
|
28 |
$forms = new Forms( $this );
|
29 |
-
$
|
|
|
30 |
|
31 |
// Initiate classes.
|
32 |
$classes = array(
|
33 |
$class_ssba,
|
34 |
$database,
|
35 |
$admin_panel,
|
|
|
36 |
$forms,
|
37 |
new Styles( $this, $class_ssba ),
|
38 |
new Admin_Bits( $this, $class_ssba, $database, $admin_panel ),
|
39 |
new Buttons( $this, $class_ssba, $admin_panel ),
|
40 |
-
new Widget(),
|
41 |
-
|
42 |
);
|
43 |
|
44 |
// Add classes doc hooks.
|
26 |
$class_ssba = new Simple_Share_Buttons_Adder( $this );
|
27 |
$database = new Database( $this, $class_ssba );
|
28 |
$forms = new Forms( $this );
|
29 |
+
$widget_class = new Widget();
|
30 |
+
$admin_panel = new Admin_Panel( $this, $class_ssba, $forms, $widget_class );
|
31 |
|
32 |
// Initiate classes.
|
33 |
$classes = array(
|
34 |
$class_ssba,
|
35 |
$database,
|
36 |
$admin_panel,
|
37 |
+
$widget_class,
|
38 |
$forms,
|
39 |
new Styles( $this, $class_ssba ),
|
40 |
new Admin_Bits( $this, $class_ssba, $database, $admin_panel ),
|
41 |
new Buttons( $this, $class_ssba, $admin_panel ),
|
|
|
|
|
42 |
);
|
43 |
|
44 |
// Add classes doc hooks.
|
php/class-widget.php
CHANGED
@@ -25,9 +25,6 @@ class Widget extends \WP_Widget {
|
|
25 |
'description' => __( 'Simple Share Buttons Adder', 'text_domain' ),
|
26 |
)
|
27 |
);
|
28 |
-
|
29 |
-
// Add ssba to available widgets.
|
30 |
-
add_action( 'widgets_init', create_function( '', 'register_widget( "SimpleShareButtonsAdder\Widget" );' ) );
|
31 |
}
|
32 |
|
33 |
/**
|
25 |
'description' => __( 'Simple Share Buttons Adder', 'text_domain' ),
|
26 |
)
|
27 |
);
|
|
|
|
|
|
|
28 |
}
|
29 |
|
30 |
/**
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
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.
|
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,6 +66,11 @@ Please visit the <a href="https://wordpress.org/support/plugin/simple-share-butt
|
|
66 |
|
67 |
== Changelog ==
|
68 |
|
|
|
|
|
|
|
|
|
|
|
69 |
= 7.4.15 =
|
70 |
* Revert: Revert wpautop removal.
|
71 |
|
2 |
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.16
|
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.16 =
|
70 |
+
* Fix: Sharedcount.com settings save issue.
|
71 |
+
* Fix: sharedcount missing index error fix.
|
72 |
+
* Fix: Remove deprecated create_function and replace with new widget registering method.
|
73 |
+
|
74 |
= 7.4.15 =
|
75 |
* Revert: Revert wpautop removal.
|
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.16
|
7 |
* Author: Simple Share Buttons
|
8 |
* Author URI: https://simplesharebuttons.com
|
9 |
* License: GPLv2
|