Version Description
- Please upgrade immediately. Bugfixes and improvements.
=
Download this release
Release Info
Developer | hiddenpearls |
Plugin | Simple Social Media Share Buttons – Social Sharing for Everyone |
Version | 2.0.22 |
Comparing to | |
See all releases |
Code changes from version 2.0.21 to 2.0.22
- assets/js/admin.js +3 -2
- classes/ssb-admin.php +3 -0
- classes/ssb-settings.php +34 -3
- inc/ssb-import-export.php +2 -0
- readme.txt +6 -3
- simple-social-buttons.php +2 -2
assets/js/admin.js
CHANGED
@@ -101,6 +101,7 @@
|
|
101 |
type: 'POST',
|
102 |
data: {
|
103 |
action : 'ssb_help',
|
|
|
104 |
},
|
105 |
beforeSend: function() {
|
106 |
$('.ssb-log-file-sniper').show();
|
@@ -238,7 +239,7 @@
|
|
238 |
$(document).on('click', '.show_pinterest_check', function () {
|
239 |
var widget_content = $(this).parent().parent();
|
240 |
if ($(this).is(':checked')) {
|
241 |
-
|
242 |
$(widget_content).find('.show_pinterest').css('display', 'block');
|
243 |
} else {
|
244 |
$(widget_content).find('.show_pinterest').css('display', 'none');
|
@@ -259,7 +260,7 @@
|
|
259 |
$(document).on('click', '.show_instagram_check', function () {
|
260 |
var widget_content = $(this).parent().parent();
|
261 |
if ($(this).is(':checked')) {
|
262 |
-
|
263 |
$(widget_content).find('.show_instagram').css('display', 'block');
|
264 |
} else {
|
265 |
$(widget_content).find('.show_instagram').css('display', 'none');
|
101 |
type: 'POST',
|
102 |
data: {
|
103 |
action : 'ssb_help',
|
104 |
+
security : ssb.ssb_export_help_nonce
|
105 |
},
|
106 |
beforeSend: function() {
|
107 |
$('.ssb-log-file-sniper').show();
|
239 |
$(document).on('click', '.show_pinterest_check', function () {
|
240 |
var widget_content = $(this).parent().parent();
|
241 |
if ($(this).is(':checked')) {
|
242 |
+
|
243 |
$(widget_content).find('.show_pinterest').css('display', 'block');
|
244 |
} else {
|
245 |
$(widget_content).find('.show_pinterest').css('display', 'none');
|
260 |
$(document).on('click', '.show_instagram_check', function () {
|
261 |
var widget_content = $(this).parent().parent();
|
262 |
if ($(this).is(':checked')) {
|
263 |
+
|
264 |
$(widget_content).find('.show_instagram').css('display', 'block');
|
265 |
} else {
|
266 |
$(widget_content).find('.show_instagram').css('display', 'none');
|
classes/ssb-admin.php
CHANGED
@@ -52,6 +52,9 @@ if ( ! class_exists( 'SimpleSocialButtonsPR_Admin' ) ) :
|
|
52 |
if ( 'toplevel_page_simple-social-buttons' == $page || 'social-buttons_page_ssb-help' == $page || 'widgets.php' == $page ) {
|
53 |
wp_enqueue_style( 'ssb-admin-cs', plugins_url( 'assets/css/admin.css',plugin_dir_path( __FILE__ ) ), false, SSB_VERSION );
|
54 |
wp_enqueue_script( 'ssb-admin-js', plugins_url( 'assets/js/admin.js',plugin_dir_path( __FILE__ ) ), array( 'jquery', 'jquery-ui-sortable' ), SSB_VERSION );
|
|
|
|
|
|
|
55 |
}
|
56 |
}
|
57 |
|
52 |
if ( 'toplevel_page_simple-social-buttons' == $page || 'social-buttons_page_ssb-help' == $page || 'widgets.php' == $page ) {
|
53 |
wp_enqueue_style( 'ssb-admin-cs', plugins_url( 'assets/css/admin.css',plugin_dir_path( __FILE__ ) ), false, SSB_VERSION );
|
54 |
wp_enqueue_script( 'ssb-admin-js', plugins_url( 'assets/js/admin.js',plugin_dir_path( __FILE__ ) ), array( 'jquery', 'jquery-ui-sortable' ), SSB_VERSION );
|
55 |
+
wp_localize_script( 'ssb-admin-js', 'ssb', array(
|
56 |
+
'ssb_export_help_nonce' => wp_create_nonce( 'ssb-export-security-check' )
|
57 |
+
) );
|
58 |
}
|
59 |
}
|
60 |
|
classes/ssb-settings.php
CHANGED
@@ -473,6 +473,12 @@ class Ssb_Settings {
|
|
473 |
|
474 |
public function download_help() {
|
475 |
|
|
|
|
|
|
|
|
|
|
|
|
|
476 |
include SSB_PLUGIN_DIR . 'classes/ssb-logs.php';
|
477 |
|
478 |
echo Ssb_Logs_Info::get_sysinfo();
|
@@ -495,6 +501,12 @@ class Ssb_Settings {
|
|
495 |
*/
|
496 |
public function export() {
|
497 |
|
|
|
|
|
|
|
|
|
|
|
|
|
498 |
$sections = $this->get_settings_sections();
|
499 |
$settings = array();
|
500 |
|
@@ -503,7 +515,8 @@ class Ssb_Settings {
|
|
503 |
$settings [ $section ['id'] ] = $result;
|
504 |
}
|
505 |
|
506 |
-
|
|
|
507 |
wp_die();
|
508 |
}
|
509 |
|
@@ -512,15 +525,33 @@ class Ssb_Settings {
|
|
512 |
*
|
513 |
* @since 2.0.4
|
514 |
*/
|
515 |
-
public function
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
516 |
|
517 |
$ssb_imp_tmp_name = $_FILES['file']['tmp_name'];
|
518 |
$ssb_file_content = file_get_contents( $ssb_imp_tmp_name );
|
519 |
$ssb_json = json_decode( $ssb_file_content, true );
|
520 |
|
|
|
521 |
if ( json_last_error() == JSON_ERROR_NONE ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
522 |
foreach ( $ssb_json as $id => $array ) {
|
523 |
-
|
|
|
|
|
524 |
}
|
525 |
} else {
|
526 |
echo "error";
|
473 |
|
474 |
public function download_help() {
|
475 |
|
476 |
+
check_ajax_referer( 'ssb-export-security-check', 'security' );
|
477 |
+
|
478 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
479 |
+
wp_die( 'Not allowed.' );
|
480 |
+
}
|
481 |
+
|
482 |
include SSB_PLUGIN_DIR . 'classes/ssb-logs.php';
|
483 |
|
484 |
echo Ssb_Logs_Info::get_sysinfo();
|
501 |
*/
|
502 |
public function export() {
|
503 |
|
504 |
+
check_ajax_referer( 'ssb-export-security-check', 'security' );
|
505 |
+
|
506 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
507 |
+
wp_die( 'Not allowed.' );
|
508 |
+
}
|
509 |
+
|
510 |
$sections = $this->get_settings_sections();
|
511 |
$settings = array();
|
512 |
|
515 |
$settings [ $section ['id'] ] = $result;
|
516 |
}
|
517 |
|
518 |
+
$settings_obj['ssb_settings_obj'] = $settings;
|
519 |
+
echo json_encode( $settings_obj );
|
520 |
wp_die();
|
521 |
}
|
522 |
|
525 |
*
|
526 |
* @since 2.0.4
|
527 |
*/
|
528 |
+
public function import() {
|
529 |
+
|
530 |
+
|
531 |
+
check_ajax_referer( 'ssb-import-security-check', 'security' );
|
532 |
+
|
533 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
534 |
+
wp_die( 'error' );
|
535 |
+
}
|
536 |
|
537 |
$ssb_imp_tmp_name = $_FILES['file']['tmp_name'];
|
538 |
$ssb_file_content = file_get_contents( $ssb_imp_tmp_name );
|
539 |
$ssb_json = json_decode( $ssb_file_content, true );
|
540 |
|
541 |
+
|
542 |
if ( json_last_error() == JSON_ERROR_NONE ) {
|
543 |
+
|
544 |
+
//Check ssb settings object set
|
545 |
+
if( ! isset( $ssb_json['ssb_settings_obj'] ) ){
|
546 |
+
wp_die( 'error' );
|
547 |
+
}
|
548 |
+
|
549 |
+
$ssb_settings_obj = $ssb_json['ssb_settings_obj'];
|
550 |
+
|
551 |
foreach ( $ssb_json as $id => $array ) {
|
552 |
+
if ( strpos( $id, 'ssb_' ) !== false ) {
|
553 |
+
update_option($id, $array);
|
554 |
+
}
|
555 |
}
|
556 |
} else {
|
557 |
echo "error";
|
inc/ssb-import-export.php
CHANGED
@@ -83,6 +83,7 @@
|
|
83 |
type: 'POST',
|
84 |
data: {
|
85 |
action : 'ssb_export',
|
|
|
86 |
},
|
87 |
beforeSend: function() {
|
88 |
$(".export_setting .export-sniper").show();
|
@@ -121,6 +122,7 @@
|
|
121 |
|
122 |
fileObj.append( 'file', content );
|
123 |
fileObj.append( 'action', 'ssb_import' );
|
|
|
124 |
|
125 |
$.ajax({
|
126 |
|
83 |
type: 'POST',
|
84 |
data: {
|
85 |
action : 'ssb_export',
|
86 |
+
security : '<?php echo wp_create_nonce( 'ssb-export-security-check' )?>'
|
87 |
},
|
88 |
beforeSend: function() {
|
89 |
$(".export_setting .export-sniper").show();
|
122 |
|
123 |
fileObj.append( 'file', content );
|
124 |
fileObj.append( 'action', 'ssb_import' );
|
125 |
+
fileObj.append( 'security', '<?php echo wp_create_nonce( 'ssb-import-security-check' )?>' );
|
126 |
|
127 |
$.ajax({
|
128 |
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://wpbrigade.com/
|
|
4 |
Tags: Social share, Social buttons, Whatsapp, Viber, LinkedIn, facebook, google, twitter, pinterest, plus one
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 5.0
|
7 |
-
Stable tag: 2.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -146,11 +146,14 @@ like_button_size = small(default), large
|
|
146 |
|
147 |
== Upgrade Notice ==
|
148 |
|
149 |
-
= 2.0.
|
150 |
* Please upgrade immediately. Bugfixes and improvements.
|
151 |
|
152 |
== Changelog ==
|
153 |
|
|
|
|
|
|
|
154 |
= 2.0.21 - 2019-02-04 =
|
155 |
* New Feature: Twitter share count tracking added.
|
156 |
* Compatibility: All in One SEO Plugin Compatibility added.
|
@@ -170,7 +173,7 @@ like_button_size = small(default), large
|
|
170 |
|
171 |
= 2.0.17 - 2018-08-25 =
|
172 |
* New Feature: Tumblr Button Added.
|
173 |
-
* Enhancement: Getting Facebook share count algorithm
|
174 |
|
175 |
= 2.0.16 - 2018-07-09 =
|
176 |
* Improvement: Like button size parameter added in short code.
|
4 |
Tags: Social share, Social buttons, Whatsapp, Viber, LinkedIn, facebook, google, twitter, pinterest, plus one
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 5.0
|
7 |
+
Stable tag: 2.0.22
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
146 |
|
147 |
== Upgrade Notice ==
|
148 |
|
149 |
+
= 2.0.22 =
|
150 |
* Please upgrade immediately. Bugfixes and improvements.
|
151 |
|
152 |
== Changelog ==
|
153 |
|
154 |
+
= 2.0.22 - 2019-02-08 =
|
155 |
+
* Enhancement: Fix security issue.
|
156 |
+
|
157 |
= 2.0.21 - 2019-02-04 =
|
158 |
* New Feature: Twitter share count tracking added.
|
159 |
* Compatibility: All in One SEO Plugin Compatibility added.
|
173 |
|
174 |
= 2.0.17 - 2018-08-25 =
|
175 |
* New Feature: Tumblr Button Added.
|
176 |
+
* Enhancement: Getting Facebook share count algorithm.
|
177 |
|
178 |
= 2.0.16 - 2018-07-09 =
|
179 |
* Improvement: Like button size parameter added in short code.
|
simple-social-buttons.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Simple Social Buttons
|
4 |
* Plugin URI: http://www.WPBrigade.com/wordpress/plugins/simple-social-buttons/
|
5 |
* Description: Simple Social Buttons adds an advanced set of social media sharing buttons to your WordPress sites, such as: Google +1, Facebook, WhatsApp, Viber, Twitter, Reddit, LinkedIn and Pinterest. This makes it the most <code>Flexible Social Sharing Plugin ever for Everyone.</code>
|
6 |
-
* Version: 2.0.
|
7 |
* Author: WPBrigade
|
8 |
* Author URI: http://www.WPBrigade.com/
|
9 |
* Text Domain: simple-social-buttons
|
@@ -30,7 +30,7 @@
|
|
30 |
|
31 |
class SimpleSocialButtonsPR {
|
32 |
public $pluginName = 'Simple Social Buttons';
|
33 |
-
public $pluginVersion = '2.0.
|
34 |
public $pluginPrefix = 'ssb_pr_';
|
35 |
public $hideCustomMetaKey = '_ssb_hide';
|
36 |
private $fb_app_id = '891268654262273';
|
3 |
* Plugin Name: Simple Social Buttons
|
4 |
* Plugin URI: http://www.WPBrigade.com/wordpress/plugins/simple-social-buttons/
|
5 |
* Description: Simple Social Buttons adds an advanced set of social media sharing buttons to your WordPress sites, such as: Google +1, Facebook, WhatsApp, Viber, Twitter, Reddit, LinkedIn and Pinterest. This makes it the most <code>Flexible Social Sharing Plugin ever for Everyone.</code>
|
6 |
+
* Version: 2.0.22
|
7 |
* Author: WPBrigade
|
8 |
* Author URI: http://www.WPBrigade.com/
|
9 |
* Text Domain: simple-social-buttons
|
30 |
|
31 |
class SimpleSocialButtonsPR {
|
32 |
public $pluginName = 'Simple Social Buttons';
|
33 |
+
public $pluginVersion = '2.0.22';
|
34 |
public $pluginPrefix = 'ssb_pr_';
|
35 |
public $hideCustomMetaKey = '_ssb_hide';
|
36 |
private $fb_app_id = '891268654262273';
|