Version Description
- Test with WordPress 5.9.3.
- Fix critical error in PHP8.
- Fix double display in some situations.
- Modern buttons are now enabled by default.
- Fix error with Pinterest share count.
- Fix Share Bar right align.
Download this release
Release Info
Developer | DavidoffNeal |
Plugin | Simple Share Buttons Adder |
Version | 8.2.5 |
Comparing to | |
See all releases |
Code changes from version 8.2.4 to 8.2.5
- css/ssba.css +1 -1
- instance.php +2 -2
- php/class-admin-panel.php +19 -10
- php/class-buttons.php +14 -9
- php/class-database.php +2 -0
- php/class-forms-validation.php +65 -0
- php/class-forms.php +1 -1
- php/class-plugin-base.php +2 -3
- php/class-plugin.php +6 -5
- php/class-simple-share-buttons-adder.php +7 -2
- php/class-util.php +50 -0
- readme.txt +11 -3
- simple-share-buttons-adder.php +1 -1
- templates/admin-panel.php +1 -1
- templates/classic-tab.php +41 -39
css/ssba.css
CHANGED
@@ -529,7 +529,7 @@
|
|
529 |
.ssbp--theme-11 .ssbp-yummly{background-color:#e16120}.ssbp--theme-11 .ssbp-yummly:hover,.ssbp--theme-11 .ssbp-yummly:focus,.ssbp--theme-11 .ssbp-yummly:active,.ssbp--theme-11 .ssbp-yummly+.ssbp-each-share{background-color:#b64d18}
|
530 |
.ssbp--theme-11 .ssbp-xing{background-color:#026466}.ssbp--theme-11 .ssbp-xing:hover,.ssbp--theme-11 .ssbp-xing:focus,.ssbp--theme-11 .ssbp-xing:active,.ssbp--theme-11 .ssbp-xing+.ssbp-each-share{background-color:#013334}
|
531 |
.ssbp--theme-11 .ssbp-each-share{padding:2px;font-size:10px;margin-right:5px;margin-left:5px;text-align:center;color:#FFF;border-radius:5px}
|
532 |
-
#ssba-bar-2.left{position:fixed;top:25vh;z-index:10000}#ssba-bar-2.right{position:fixed;right:0;top:25vh;z-index:10000}
|
533 |
#ssba-bar-2.left .ssbp-bar-list{max-width:84px;text-align:left;min-width:auto;margin:0;padding:0;list-style:none}
|
534 |
#ssba-bar-2.right .ssbp-bar-list{max-width:84px;text-align:right;min-width:auto;margin:0;padding:0;list-style:none}
|
535 |
#ssba-bar-2 .ssbp-bar-list li{margin:0;margin-left:0;margin-right:0;display:block;position:relative}
|
529 |
.ssbp--theme-11 .ssbp-yummly{background-color:#e16120}.ssbp--theme-11 .ssbp-yummly:hover,.ssbp--theme-11 .ssbp-yummly:focus,.ssbp--theme-11 .ssbp-yummly:active,.ssbp--theme-11 .ssbp-yummly+.ssbp-each-share{background-color:#b64d18}
|
530 |
.ssbp--theme-11 .ssbp-xing{background-color:#026466}.ssbp--theme-11 .ssbp-xing:hover,.ssbp--theme-11 .ssbp-xing:focus,.ssbp--theme-11 .ssbp-xing:active,.ssbp--theme-11 .ssbp-xing+.ssbp-each-share{background-color:#013334}
|
531 |
.ssbp--theme-11 .ssbp-each-share{padding:2px;font-size:10px;margin-right:5px;margin-left:5px;text-align:center;color:#FFF;border-radius:5px}
|
532 |
+
#ssba-bar-2.left{position:fixed;top:25vh;z-index:10000}#ssba-bar-2.right{max-width:fit-content;position:fixed;right:0;top:25vh;z-index:10000}
|
533 |
#ssba-bar-2.left .ssbp-bar-list{max-width:84px;text-align:left;min-width:auto;margin:0;padding:0;list-style:none}
|
534 |
#ssba-bar-2.right .ssbp-bar-list{max-width:84px;text-align:right;min-width:auto;margin:0;padding:0;list-style:none}
|
535 |
#ssba-bar-2 .ssbp-bar-list li{margin:0;margin-left:0;margin-right:0;display:block;position:relative}
|
instance.php
CHANGED
@@ -8,8 +8,8 @@
|
|
8 |
namespace SimpleShareButtonsAdder;
|
9 |
|
10 |
define( 'SSBA_FILE', __FILE__ );
|
11 |
-
define( 'SSBA_ROOT', dirname( __FILE__ ) );
|
12 |
-
define( 'SSBA_VERSION', '8.2.
|
13 |
|
14 |
global $simple_share_buttons_adder_plugin;
|
15 |
|
8 |
namespace SimpleShareButtonsAdder;
|
9 |
|
10 |
define( 'SSBA_FILE', __FILE__ );
|
11 |
+
define( 'SSBA_ROOT', trailingslashit( dirname( __FILE__ ) ) );
|
12 |
+
define( 'SSBA_VERSION', '8.2.5' );
|
13 |
|
14 |
global $simple_share_buttons_adder_plugin;
|
15 |
|
php/class-admin-panel.php
CHANGED
@@ -37,23 +37,32 @@ class Admin_Panel {
|
|
37 |
/**
|
38 |
* Forms instance.
|
39 |
*
|
40 |
-
* @var
|
41 |
*/
|
42 |
public $forms;
|
43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
/**
|
45 |
* Admin_Panel constructor.
|
46 |
*
|
47 |
-
* @param object $plugin
|
48 |
-
* @param object $class_ssba
|
49 |
-
* @param object $forms
|
50 |
-
* @param
|
|
|
51 |
*/
|
52 |
-
public function __construct( $plugin, $class_ssba, $forms, $widget_class ) {
|
53 |
-
$this->plugin
|
54 |
-
$this->class_ssba
|
55 |
-
$this->forms
|
56 |
-
$this->
|
|
|
57 |
}
|
58 |
|
59 |
/**
|
37 |
/**
|
38 |
* Forms instance.
|
39 |
*
|
40 |
+
* @var Forms
|
41 |
*/
|
42 |
public $forms;
|
43 |
|
44 |
+
/**
|
45 |
+
* Forms Validation instance.
|
46 |
+
*
|
47 |
+
* @var Forms_Validation
|
48 |
+
*/
|
49 |
+
public $forms_validation;
|
50 |
+
|
51 |
/**
|
52 |
* Admin_Panel constructor.
|
53 |
*
|
54 |
+
* @param object $plugin Plugin instance.
|
55 |
+
* @param object $class_ssba Simple Share Buttons Adder instance.
|
56 |
+
* @param object $forms Forms instance.
|
57 |
+
* @param object $forms_validation Forms Validation instance.
|
58 |
+
* @param object $widget_class Widget class.
|
59 |
*/
|
60 |
+
public function __construct( $plugin, $class_ssba, $forms, $forms_validation, $widget_class ) {
|
61 |
+
$this->plugin = $plugin;
|
62 |
+
$this->class_ssba = $class_ssba;
|
63 |
+
$this->forms = $forms;
|
64 |
+
$this->forms_validation = $forms_validation;
|
65 |
+
$this->widget_class = $widget_class;
|
66 |
}
|
67 |
|
68 |
/**
|
php/class-buttons.php
CHANGED
@@ -1594,25 +1594,30 @@ class Buttons {
|
|
1594 |
*/
|
1595 |
public function get_pinterest_share_count( $url_current_page ) {
|
1596 |
// Get results from pinterest.
|
1597 |
-
$html_pinterest_share_details =
|
1598 |
-
'
|
1599 |
array(
|
1600 |
'timeout' => 6,
|
1601 |
)
|
1602 |
);
|
1603 |
|
1604 |
// Check there was an error.
|
1605 |
-
if ( is_wp_error( $html_pinterest_share_details ) ) {
|
1606 |
return 0;
|
1607 |
}
|
1608 |
|
1609 |
-
|
1610 |
-
|
1611 |
-
|
1612 |
-
|
1613 |
-
|
|
|
|
|
|
|
|
|
|
|
1614 |
|
1615 |
-
return $
|
1616 |
}
|
1617 |
|
1618 |
/**
|
1594 |
*/
|
1595 |
public function get_pinterest_share_count( $url_current_page ) {
|
1596 |
// Get results from pinterest.
|
1597 |
+
$html_pinterest_share_details = wp_remote_get(
|
1598 |
+
'https://api.pinterest.com/v1/urls/count.json?url=' . $url_current_page,
|
1599 |
array(
|
1600 |
'timeout' => 6,
|
1601 |
)
|
1602 |
);
|
1603 |
|
1604 |
// Check there was an error.
|
1605 |
+
if ( true === is_wp_error( $html_pinterest_share_details ) ) {
|
1606 |
return 0;
|
1607 |
}
|
1608 |
|
1609 |
+
$body = wp_remote_retrieve_body( $html_pinterest_share_details );
|
1610 |
+
|
1611 |
+
if ( false === is_string( $body ) ) {
|
1612 |
+
return 0;
|
1613 |
+
}
|
1614 |
+
|
1615 |
+
$body = str_replace( 'receiveCount(', '', $body );
|
1616 |
+
$body = str_replace( ')', '', $body );
|
1617 |
+
$json = json_decode( $body, true );
|
1618 |
+
$count = $json['count'];
|
1619 |
|
1620 |
+
return $count ? $this->ssba_format_number( $count ) : '0';
|
1621 |
}
|
1622 |
|
1623 |
/**
|
php/class-database.php
CHANGED
@@ -265,10 +265,12 @@ class Database {
|
|
265 |
public function deactivate() {
|
266 |
// Delete options.
|
267 |
delete_option( 'ssba_settings' );
|
|
|
268 |
delete_option( 'ssba_version' );
|
269 |
delete_option( 'ssba_property_id' );
|
270 |
delete_option( 'ssba_token' );
|
271 |
delete_option( 'ssba_buttons' );
|
|
|
272 |
}
|
273 |
|
274 |
/**
|
265 |
public function deactivate() {
|
266 |
// Delete options.
|
267 |
delete_option( 'ssba_settings' );
|
268 |
+
delete_option( 'ssba_selected_tab' );
|
269 |
delete_option( 'ssba_version' );
|
270 |
delete_option( 'ssba_property_id' );
|
271 |
delete_option( 'ssba_token' );
|
272 |
delete_option( 'ssba_buttons' );
|
273 |
+
delete_option( 'widget_ssba_widget' );
|
274 |
}
|
275 |
|
276 |
/**
|
php/class-forms-validation.php
ADDED
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Forms Validation.
|
4 |
+
*
|
5 |
+
* @package SimpleShareButtonsAdder
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace SimpleShareButtonsAdder;
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Forms Validation Class
|
12 |
+
*
|
13 |
+
* @package SimpleShareButtonsAdder
|
14 |
+
*/
|
15 |
+
class Forms_Validation {
|
16 |
+
/**
|
17 |
+
* Input validation.
|
18 |
+
*
|
19 |
+
* @return array
|
20 |
+
*/
|
21 |
+
public function allowed_input_fields() {
|
22 |
+
return array(
|
23 |
+
'button' => array(
|
24 |
+
'class' => array(),
|
25 |
+
'data-*' => array(),
|
26 |
+
'id' => array(),
|
27 |
+
'type' => array(),
|
28 |
+
),
|
29 |
+
'div' => array(
|
30 |
+
'class' => array(),
|
31 |
+
),
|
32 |
+
'label' => array(),
|
33 |
+
'input' => array(
|
34 |
+
'class' => array(),
|
35 |
+
'disabled' => array(),
|
36 |
+
'id' => array(),
|
37 |
+
'name' => array(),
|
38 |
+
'placeholder' => array(),
|
39 |
+
'type' => array(),
|
40 |
+
'value' => array(),
|
41 |
+
),
|
42 |
+
'option' => array(
|
43 |
+
'selected' => array(),
|
44 |
+
'value' => array(),
|
45 |
+
),
|
46 |
+
'p' => array(
|
47 |
+
'class' => array(),
|
48 |
+
),
|
49 |
+
'select' => array(
|
50 |
+
'class' => array(),
|
51 |
+
'id' => array(),
|
52 |
+
'name' => array(),
|
53 |
+
),
|
54 |
+
'textarea' => array(
|
55 |
+
'class' => array(),
|
56 |
+
'id' => array(),
|
57 |
+
'name' => array(),
|
58 |
+
'rows' => array(),
|
59 |
+
),
|
60 |
+
'span' => array(
|
61 |
+
'class' => array(),
|
62 |
+
),
|
63 |
+
);
|
64 |
+
}
|
65 |
+
}
|
php/class-forms.php
CHANGED
@@ -49,7 +49,7 @@ class Forms {
|
|
49 |
public function open( $wrap, $action = '', $class = '' ) {
|
50 |
$wrap = $wrap ? 'ssba-form-wrap' : '';
|
51 |
$return = '<div class="' . esc_attr( $wrap ) . '">';
|
52 |
-
$return .= '<form class="form-horizontal ' . esc_attr( $class ) . '" id="ssba-admin-form" method="post" action="' . esc_attr( $action ) . '">';
|
53 |
|
54 |
// Required hidden fields.
|
55 |
$return .= wp_nonce_field( 'ssba_save_settings', 'ssba_save_nonce' );
|
49 |
public function open( $wrap, $action = '', $class = '' ) {
|
50 |
$wrap = $wrap ? 'ssba-form-wrap' : '';
|
51 |
$return = '<div class="' . esc_attr( $wrap ) . '">';
|
52 |
+
$return .= '<form class="form-horizontal ' . esc_attr( $class ) . '" id="ssba-admin-form" method="post" action="' . esc_attr( $action ) . '" autocomplete="off">';
|
53 |
|
54 |
// Required hidden fields.
|
55 |
$return .= wp_nonce_field( 'ssba_save_settings', 'ssba_save_nonce' );
|
php/class-plugin-base.php
CHANGED
@@ -145,9 +145,8 @@ abstract class Plugin_Base {
|
|
145 |
* @return array
|
146 |
*/
|
147 |
public function locate_plugin() {
|
148 |
-
$
|
149 |
-
$
|
150 |
-
$dir_path = substr( str_replace( 'class-plugin-base', '', $base_file ), 0, -2 );
|
151 |
$dir_basename = basename( $dir_path );
|
152 |
|
153 |
return compact( 'dir_url', 'dir_path', 'dir_basename' );
|
145 |
* @return array
|
146 |
*/
|
147 |
public function locate_plugin() {
|
148 |
+
$dir_url = trailingslashit( plugins_url( '', SSBA_FILE ) );
|
149 |
+
$dir_path = trailingslashit( dirname( SSBA_FILE ) );
|
|
|
150 |
$dir_basename = basename( $dir_path );
|
151 |
|
152 |
return compact( 'dir_url', 'dir_path', 'dir_basename' );
|
php/class-plugin.php
CHANGED
@@ -23,11 +23,12 @@ class Plugin extends Plugin_Base {
|
|
23 |
$this->meta_prefix = strtolower( preg_replace( '/\B([A-Z])/', '_$1', __NAMESPACE__ ) );
|
24 |
|
25 |
// Globals.
|
26 |
-
$class_ssba
|
27 |
-
$database
|
28 |
-
$forms
|
29 |
-
$
|
30 |
-
$
|
|
|
31 |
|
32 |
// Initiate classes.
|
33 |
$classes = array(
|
23 |
$this->meta_prefix = strtolower( preg_replace( '/\B([A-Z])/', '_$1', __NAMESPACE__ ) );
|
24 |
|
25 |
// Globals.
|
26 |
+
$class_ssba = new Simple_Share_Buttons_Adder( $this );
|
27 |
+
$database = new Database( $this, $class_ssba );
|
28 |
+
$forms = new Forms( $this );
|
29 |
+
$forms_validation = new Forms_Validation();
|
30 |
+
$widget_class = new Widget();
|
31 |
+
$admin_panel = new Admin_Panel( $this, $class_ssba, $forms, $forms_validation, $widget_class );
|
32 |
|
33 |
// Initiate classes.
|
34 |
$classes = array(
|
php/class-simple-share-buttons-adder.php
CHANGED
@@ -14,7 +14,6 @@ namespace SimpleShareButtonsAdder;
|
|
14 |
*/
|
15 |
class Simple_Share_Buttons_Adder {
|
16 |
|
17 |
-
|
18 |
/**
|
19 |
* Plugin instance.
|
20 |
*
|
@@ -44,7 +43,13 @@ class Simple_Share_Buttons_Adder {
|
|
44 |
|
45 |
$ssba_settings = get_option( 'ssba_settings', true );
|
46 |
|
47 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
return $ssba_settings;
|
49 |
}
|
50 |
|
14 |
*/
|
15 |
class Simple_Share_Buttons_Adder {
|
16 |
|
|
|
17 |
/**
|
18 |
* Plugin instance.
|
19 |
*
|
43 |
|
44 |
$ssba_settings = get_option( 'ssba_settings', true );
|
45 |
|
46 |
+
$ssba_settings = Util::parse_args(
|
47 |
+
$ssba_settings,
|
48 |
+
array(
|
49 |
+
'ssba_content_priority' => 10,
|
50 |
+
)
|
51 |
+
);
|
52 |
+
|
53 |
return $ssba_settings;
|
54 |
}
|
55 |
|
php/class-util.php
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Utilities.
|
4 |
+
*
|
5 |
+
* @package SimpleShareButtonsAdder
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace SimpleShareButtonsAdder;
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Utilities Class
|
12 |
+
*
|
13 |
+
* @package SimpleShareButtonsAdder
|
14 |
+
*/
|
15 |
+
class Util {
|
16 |
+
/**
|
17 |
+
* Merges user defined arguments into defaults array.
|
18 |
+
*
|
19 |
+
* This function is used throughout this plugin to allow for both string or array
|
20 |
+
* to be merged into another array.
|
21 |
+
*
|
22 |
+
* @param string|array|object $args Value to merge with $defaults.
|
23 |
+
* @param array $defaults Optional. Array that serves as the defaults.
|
24 |
+
* Default empty array.
|
25 |
+
* @return array Merged user defined values with defaults.
|
26 |
+
*/
|
27 |
+
public static function parse_args( $args, $defaults = array() ) {
|
28 |
+
$parsed_args = isset( $parsed_args ) ? $parsed_args : array();
|
29 |
+
|
30 |
+
if ( is_object( $args ) ) {
|
31 |
+
$parsed_args = get_object_vars( $args );
|
32 |
+
} elseif ( is_array( $args ) ) {
|
33 |
+
$parsed_args =& $args;
|
34 |
+
} else {
|
35 |
+
self::parse_args( $args, $parsed_args );
|
36 |
+
}
|
37 |
+
|
38 |
+
if ( is_array( $defaults ) && $defaults ) {
|
39 |
+
foreach ( $parsed_args as $parsed_arg_key => $parsed_arg ) {
|
40 |
+
if ( true === empty( $parsed_arg ) && true === isset( $defaults[ $parsed_arg_key ] ) ) {
|
41 |
+
$parsed_args[ $parsed_arg_key ] = $defaults[ $parsed_arg_key ];
|
42 |
+
}
|
43 |
+
}
|
44 |
+
|
45 |
+
return array_merge( $defaults, $parsed_args );
|
46 |
+
}
|
47 |
+
|
48 |
+
return $parsed_args;
|
49 |
+
}
|
50 |
+
}
|
readme.txt
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
Contributors: sharethis, scottstorebloom, scottmweaver, surlyrightclick, DavidoffNeal
|
3 |
Tags: share buttons, social buttons, facebook, twitter, google+, share, share links, stumble upon, linkedin, pinterest, yummly, vk, flattr
|
4 |
Requires at least: 4.5
|
5 |
-
Tested up to: 5.9.
|
6 |
-
Stable tag: 8.2.
|
7 |
-
Version: 8.2.
|
8 |
License: GPLv2 or later
|
9 |
|
10 |
A simple plugin that enables you to add share buttons to all of your posts and/or pages.
|
@@ -67,6 +67,14 @@ Please visit the <a href="https://wordpress.org/support/plugin/simple-share-butt
|
|
67 |
|
68 |
== Changelog ==
|
69 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
= 8.2.4 =
|
71 |
* Test with WordPress 5.9.1.
|
72 |
* Clean up and sanitize things.
|
2 |
Contributors: sharethis, scottstorebloom, scottmweaver, surlyrightclick, DavidoffNeal
|
3 |
Tags: share buttons, social buttons, facebook, twitter, google+, share, share links, stumble upon, linkedin, pinterest, yummly, vk, flattr
|
4 |
Requires at least: 4.5
|
5 |
+
Tested up to: 5.9.3
|
6 |
+
Stable tag: 8.2.5
|
7 |
+
Version: 8.2.5
|
8 |
License: GPLv2 or later
|
9 |
|
10 |
A simple plugin that enables you to add share buttons to all of your posts and/or pages.
|
67 |
|
68 |
== Changelog ==
|
69 |
|
70 |
+
= 8.2.5 =
|
71 |
+
* Test with WordPress 5.9.3.
|
72 |
+
* Fix critical error in PHP8.
|
73 |
+
* Fix double display in some situations.
|
74 |
+
* Modern buttons are now enabled by default.
|
75 |
+
* Fix error with Pinterest share count.
|
76 |
+
* Fix Share Bar right align.
|
77 |
+
|
78 |
= 8.2.4 =
|
79 |
* Test with WordPress 5.9.1.
|
80 |
* Clean up and sanitize things.
|
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: 8.2.
|
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: 8.2.5
|
7 |
* Author: Simple Share Buttons
|
8 |
* Author URI: https://simplesharebuttons.com
|
9 |
* License: GPLv2
|
templates/admin-panel.php
CHANGED
@@ -8,7 +8,7 @@
|
|
8 |
*/
|
9 |
|
10 |
$selected_tab = get_option( 'ssba_selected_tab' );
|
11 |
-
$selected_tab = null !== $selected_tab && false !== $selected_tab ? $selected_tab : '
|
12 |
$classic = 'classic' === $selected_tab ? 'active' : '';
|
13 |
$modern = isset( $selected_tab ) && 'modern' === $selected_tab ? 'active' : '';
|
14 |
$bar = isset( $selected_tab ) && 'bar' === $selected_tab ? 'active' : '';
|
8 |
*/
|
9 |
|
10 |
$selected_tab = get_option( 'ssba_selected_tab' );
|
11 |
+
$selected_tab = null !== $selected_tab && false !== $selected_tab ? $selected_tab : 'modern';
|
12 |
$classic = 'classic' === $selected_tab ? 'active' : '';
|
13 |
$modern = isset( $selected_tab ) && 'modern' === $selected_tab ? 'active' : '';
|
14 |
$bar = isset( $selected_tab ) && 'bar' === $selected_tab ? 'active' : '';
|
templates/classic-tab.php
CHANGED
@@ -5,6 +5,8 @@
|
|
5 |
* The template wrapper for the classic tab.
|
6 |
*
|
7 |
* @package SimpleShareButtonsAdder
|
|
|
|
|
8 |
*/
|
9 |
|
10 |
use SimpleShareButtonsAdder\Admin_Panel;
|
@@ -81,8 +83,8 @@ use SimpleShareButtonsAdder\Admin_Panel;
|
|
81 |
</div>
|
82 |
<?php
|
83 |
echo $this->forms->ssbp_checkboxes( $opts1 ); // phpcs:ignore
|
84 |
-
echo
|
85 |
-
echo
|
86 |
|
87 |
$line_height = 'below' === $arr_settings['ssba_text_placement'] || 'above' === $arr_settings['ssba_text_placement'] ? 'inherit' : ( (int) $arr_settings['ssba_size'] + (int) $arr_settings['ssba_padding'] + 3 ) . 'px';
|
88 |
$image_line_height = $arr_settings['ssba_size'] . 'px';
|
@@ -140,7 +142,7 @@ use SimpleShareButtonsAdder\Admin_Panel;
|
|
140 |
</div>
|
141 |
|
142 |
<div class="col-md-6">
|
143 |
-
<?php echo
|
144 |
|
145 |
<div id="ssba-custom-images" <?php echo 'custom' !== $arr_settings['ssba_image_set'] ? 'style="display: none;"' : null; ?>>
|
146 |
<?php
|
@@ -157,17 +159,17 @@ use SimpleShareButtonsAdder\Admin_Panel;
|
|
157 |
'tooltip' => 'Upload a custom ' . $arr_button['full_name'] . ' image',
|
158 |
'value' => isset( $arr_settings[ 'ssba_custom_' . $custom_button ] ) ? $arr_settings[ 'ssba_custom_' . $custom_button ] : '',
|
159 |
);
|
160 |
-
echo
|
161 |
}
|
162 |
?>
|
163 |
</div>
|
164 |
|
165 |
-
<?php echo
|
166 |
</div>
|
167 |
<div class="col-md-6">
|
168 |
<?php
|
169 |
-
echo
|
170 |
-
echo
|
171 |
?>
|
172 |
</div>
|
173 |
|
@@ -176,16 +178,16 @@ use SimpleShareButtonsAdder\Admin_Panel;
|
|
176 |
</div>
|
177 |
<div class="col-md-6 share-text-prev">
|
178 |
<?php
|
179 |
-
echo
|
180 |
-
echo
|
181 |
-
echo
|
182 |
?>
|
183 |
</div>
|
184 |
<div class="col-md-6 share-text-prev">
|
185 |
<?php
|
186 |
-
echo
|
187 |
-
echo
|
188 |
-
echo
|
189 |
?>
|
190 |
</div>
|
191 |
|
@@ -194,19 +196,19 @@ use SimpleShareButtonsAdder\Admin_Panel;
|
|
194 |
</div>
|
195 |
|
196 |
<div class="col-md-12 share-cont-prev">
|
197 |
-
<?php echo
|
198 |
</div>
|
199 |
|
200 |
<div class="col-md-6 share-cont-prev">
|
201 |
<?php
|
202 |
-
echo
|
203 |
-
echo
|
204 |
?>
|
205 |
</div>
|
206 |
<div class="col-md-6 share-cont-prev">
|
207 |
<?php
|
208 |
-
echo
|
209 |
-
echo
|
210 |
?>
|
211 |
</div>
|
212 |
</div>
|
@@ -225,9 +227,9 @@ use SimpleShareButtonsAdder\Admin_Panel;
|
|
225 |
|
226 |
<div class="col-md-12 share-count-prev">
|
227 |
<?php
|
228 |
-
echo
|
229 |
-
echo
|
230 |
-
echo
|
231 |
?>
|
232 |
</div>
|
233 |
</div>
|
@@ -266,19 +268,19 @@ use SimpleShareButtonsAdder\Admin_Panel;
|
|
266 |
|
267 |
<div class="col-md-12">
|
268 |
<?php
|
269 |
-
echo
|
270 |
-
echo
|
271 |
-
echo
|
272 |
-
echo
|
273 |
?>
|
274 |
</div>
|
275 |
|
276 |
<div class="col-md-6">
|
277 |
-
<?php echo
|
278 |
</div>
|
279 |
|
280 |
<div class="col-md-6">
|
281 |
-
<?php echo
|
282 |
</div>
|
283 |
|
284 |
<div class="col-md-12">
|
@@ -286,11 +288,11 @@ use SimpleShareButtonsAdder\Admin_Panel;
|
|
286 |
</div>
|
287 |
|
288 |
<div class="col-md-12">
|
289 |
-
<?php echo
|
290 |
</div>
|
291 |
|
292 |
<div class="col-md-12">
|
293 |
-
<?php echo
|
294 |
</div>
|
295 |
|
296 |
<div class="col-md-12">
|
@@ -298,26 +300,26 @@ use SimpleShareButtonsAdder\Admin_Panel;
|
|
298 |
</div>
|
299 |
|
300 |
<div class="col-md-12">
|
301 |
-
<?php echo
|
302 |
</div>
|
303 |
|
304 |
<div class="col-md-6">
|
305 |
<?php
|
306 |
-
echo
|
307 |
-
echo
|
308 |
?>
|
309 |
</div>
|
310 |
<div class="col-md-6">
|
311 |
<?php
|
312 |
-
echo
|
313 |
-
echo
|
314 |
?>
|
315 |
</div>
|
316 |
|
317 |
<div class="col-md-12">
|
318 |
<?php
|
319 |
-
echo
|
320 |
-
echo
|
321 |
?>
|
322 |
</div>
|
323 |
</div>
|
@@ -341,7 +343,7 @@ use SimpleShareButtonsAdder\Admin_Panel;
|
|
341 |
</div>
|
342 |
|
343 |
<div class="col-sm-12">
|
344 |
-
<?php echo
|
345 |
</div>
|
346 |
|
347 |
<div class="col-md-12">
|
@@ -352,8 +354,8 @@ use SimpleShareButtonsAdder\Admin_Panel;
|
|
352 |
|
353 |
<div class="col-sm-12">
|
354 |
<?php
|
355 |
-
echo
|
356 |
-
echo
|
357 |
?>
|
358 |
</div>
|
359 |
</div>
|
5 |
* The template wrapper for the classic tab.
|
6 |
*
|
7 |
* @package SimpleShareButtonsAdder
|
8 |
+
*
|
9 |
+
* @var $this Admin_Panel
|
10 |
*/
|
11 |
|
12 |
use SimpleShareButtonsAdder\Admin_Panel;
|
83 |
</div>
|
84 |
<?php
|
85 |
echo $this->forms->ssbp_checkboxes( $opts1 ); // phpcs:ignore
|
86 |
+
echo $this->forms->ssbp_input( $opts2 ); // phpcs:ignore
|
87 |
+
echo $this->forms->ssbp_input( $page_omit ); // phpcs:ignore
|
88 |
|
89 |
$line_height = 'below' === $arr_settings['ssba_text_placement'] || 'above' === $arr_settings['ssba_text_placement'] ? 'inherit' : ( (int) $arr_settings['ssba_size'] + (int) $arr_settings['ssba_padding'] + 3 ) . 'px';
|
90 |
$image_line_height = $arr_settings['ssba_size'] . 'px';
|
142 |
</div>
|
143 |
|
144 |
<div class="col-md-6">
|
145 |
+
<?php echo wp_kses( $this->forms->ssbp_input( $opts4 ), $this->forms_validation->allowed_input_fields() ); ?>
|
146 |
|
147 |
<div id="ssba-custom-images" <?php echo 'custom' !== $arr_settings['ssba_image_set'] ? 'style="display: none;"' : null; ?>>
|
148 |
<?php
|
159 |
'tooltip' => 'Upload a custom ' . $arr_button['full_name'] . ' image',
|
160 |
'value' => isset( $arr_settings[ 'ssba_custom_' . $custom_button ] ) ? $arr_settings[ 'ssba_custom_' . $custom_button ] : '',
|
161 |
);
|
162 |
+
echo wp_kses( $this->forms->ssbp_input( $opts5 ), $this->forms_validation->allowed_input_fields() );
|
163 |
}
|
164 |
?>
|
165 |
</div>
|
166 |
|
167 |
+
<?php echo wp_kses( $this->forms->ssbp_input( $opts6 ), $this->forms_validation->allowed_input_fields() ); ?>
|
168 |
</div>
|
169 |
<div class="col-md-6">
|
170 |
<?php
|
171 |
+
echo wp_kses( $this->forms->ssbp_input( $opts7 ), $this->forms_validation->allowed_input_fields() );
|
172 |
+
echo wp_kses( $this->forms->ssbp_input( $opts8 ), $this->forms_validation->allowed_input_fields() );
|
173 |
?>
|
174 |
</div>
|
175 |
|
178 |
</div>
|
179 |
<div class="col-md-6 share-text-prev">
|
180 |
<?php
|
181 |
+
echo wp_kses( $this->forms->ssbp_input( $opts3 ), $this->forms_validation->allowed_input_fields() );
|
182 |
+
echo wp_kses( $this->forms->ssbp_input( $opts10 ), $this->forms_validation->allowed_input_fields() );
|
183 |
+
echo wp_kses( $this->forms->ssbp_input( $opts11 ), $this->forms_validation->allowed_input_fields() );
|
184 |
?>
|
185 |
</div>
|
186 |
<div class="col-md-6 share-text-prev">
|
187 |
<?php
|
188 |
+
echo wp_kses( $this->forms->ssbp_input( $opts12 ), $this->forms_validation->allowed_input_fields() );
|
189 |
+
echo wp_kses( $this->forms->ssbp_input( $opts13 ), $this->forms_validation->allowed_input_fields() );
|
190 |
+
echo wp_kses( $this->forms->ssbp_input( $opts9 ), $this->forms_validation->allowed_input_fields() );
|
191 |
?>
|
192 |
</div>
|
193 |
|
196 |
</div>
|
197 |
|
198 |
<div class="col-md-12 share-cont-prev">
|
199 |
+
<?php echo wp_kses( $this->forms->ssbp_input( $opts18 ), $this->forms_validation->allowed_input_fields() ); ?>
|
200 |
</div>
|
201 |
|
202 |
<div class="col-md-6 share-cont-prev">
|
203 |
<?php
|
204 |
+
echo wp_kses( $this->forms->ssbp_input( $opts14 ), $this->forms_validation->allowed_input_fields() );
|
205 |
+
echo wp_kses( $this->forms->ssbp_input( $opts17 ), $this->forms_validation->allowed_input_fields() );
|
206 |
?>
|
207 |
</div>
|
208 |
<div class="col-md-6 share-cont-prev">
|
209 |
<?php
|
210 |
+
echo wp_kses( $this->forms->ssbp_input( $opts16 ), $this->forms_validation->allowed_input_fields() );
|
211 |
+
echo wp_kses( $this->forms->ssbp_input( $opts15 ), $this->forms_validation->allowed_input_fields() );
|
212 |
?>
|
213 |
</div>
|
214 |
</div>
|
227 |
|
228 |
<div class="col-md-12 share-count-prev">
|
229 |
<?php
|
230 |
+
echo wp_kses( $this->forms->ssbp_input( $opts19 ), $this->forms_validation->allowed_input_fields() );
|
231 |
+
echo wp_kses( $this->forms->ssbp_input( $opts20 ), $this->forms_validation->allowed_input_fields() );
|
232 |
+
echo wp_kses( $this->forms->ssbp_input( $opts21 ), $this->forms_validation->allowed_input_fields() );
|
233 |
?>
|
234 |
</div>
|
235 |
</div>
|
268 |
|
269 |
<div class="col-md-12">
|
270 |
<?php
|
271 |
+
echo wp_kses( $this->forms->ssbp_input( $opts26 ), $this->forms_validation->allowed_input_fields() );
|
272 |
+
echo wp_kses( $this->forms->ssbp_input( $opts27 ), $this->forms_validation->allowed_input_fields() );
|
273 |
+
echo wp_kses( $this->forms->ssbp_input( $opts28 ), $this->forms_validation->allowed_input_fields() );
|
274 |
+
echo wp_kses( $this->forms->ssbp_input( $opts29 ), $this->forms_validation->allowed_input_fields() );
|
275 |
?>
|
276 |
</div>
|
277 |
|
278 |
<div class="col-md-6">
|
279 |
+
<?php echo wp_kses( $this->forms->ssbp_input( $opts30 ), $this->forms_validation->allowed_input_fields() ); // phcs:ignore. ?>
|
280 |
</div>
|
281 |
|
282 |
<div class="col-md-6">
|
283 |
+
<?php echo wp_kses( $this->forms->ssbp_input( $opts31 ), $this->forms_validation->allowed_input_fields() ); // phcs:ignore. ?>
|
284 |
</div>
|
285 |
|
286 |
<div class="col-md-12">
|
288 |
</div>
|
289 |
|
290 |
<div class="col-md-12">
|
291 |
+
<?php echo wp_kses( $this->forms->ssbp_input( $opts33 ), $this->forms_validation->allowed_input_fields() ); ?>
|
292 |
</div>
|
293 |
|
294 |
<div class="col-md-12">
|
295 |
+
<?php echo wp_kses( $this->forms->ssbp_input( $ignore_sdk ), $this->forms_validation->allowed_input_fields() ); ?>
|
296 |
</div>
|
297 |
|
298 |
<div class="col-md-12">
|
300 |
</div>
|
301 |
|
302 |
<div class="col-md-12">
|
303 |
+
<?php echo wp_kses( $this->forms->ssbp_input( $opts32 ), $this->forms_validation->allowed_input_fields() ); ?>
|
304 |
</div>
|
305 |
|
306 |
<div class="col-md-6">
|
307 |
<?php
|
308 |
+
echo wp_kses( $this->forms->ssbp_input( $opts34 ), $this->forms_validation->allowed_input_fields() );
|
309 |
+
echo wp_kses( $this->forms->ssbp_input( $opts37 ), $this->forms_validation->allowed_input_fields() );
|
310 |
?>
|
311 |
</div>
|
312 |
<div class="col-md-6">
|
313 |
<?php
|
314 |
+
echo wp_kses( $this->forms->ssbp_input( $opts35 ), $this->forms_validation->allowed_input_fields() );
|
315 |
+
echo wp_kses( $this->forms->ssbp_input( $opts36 ), $this->forms_validation->allowed_input_fields() );
|
316 |
?>
|
317 |
</div>
|
318 |
|
319 |
<div class="col-md-12">
|
320 |
<?php
|
321 |
+
echo wp_kses( $this->forms->ssbp_input( $opts38 ), $this->forms_validation->allowed_input_fields() );
|
322 |
+
echo wp_kses( $this->forms->ssbp_input( $opts39 ), $this->forms_validation->allowed_input_fields() );
|
323 |
?>
|
324 |
</div>
|
325 |
</div>
|
343 |
</div>
|
344 |
|
345 |
<div class="col-sm-12">
|
346 |
+
<?php echo wp_kses( $this->forms->ssbp_input( $opts40 ), $this->forms_validation->allowed_input_fields() ); ?>
|
347 |
</div>
|
348 |
|
349 |
<div class="col-md-12">
|
354 |
|
355 |
<div class="col-sm-12">
|
356 |
<?php
|
357 |
+
echo wp_kses( $this->forms->ssbp_input( $opts41 ), $this->forms_validation->allowed_input_fields() );
|
358 |
+
echo wp_kses( $this->forms->ssbp_input( $opts42 ), $this->forms_validation->allowed_input_fields() );
|
359 |
?>
|
360 |
</div>
|
361 |
</div>
|