Version Description
- Please upgrade immediately. Bugfixes and improvements.
=
Download this release
Release Info
| Developer | hiddenpearls |
| Plugin | |
| Version | 2.0.20 |
| Comparing to | |
| See all releases | |
Code changes from version 2.0.19 to 2.0.20
- readme.txt +6 -4
- simple-social-buttons.php +24 -12
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: 4.9
|
| 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.
|
| 151 |
|
| 152 |
== Changelog ==
|
| 153 |
|
|
|
|
|
|
|
|
|
|
| 154 |
= 2.0.19 - 2018-09-13 =
|
| 155 |
* Improvement: Warning: DOMDocument::loadHTML(): htmlParseEntityRef: no name in Entity
|
| 156 |
|
|
@@ -174,7 +177,6 @@ like_button_size = small(default), large
|
|
| 174 |
= 2.0.14 - 2018-03-20 =
|
| 175 |
* Bug Fix: Headers already sent on upgrade routine.
|
| 176 |
|
| 177 |
-
|
| 178 |
= 2.0.13 - 2018-03-20 =
|
| 179 |
* Bug Fix: Twitter share issue.
|
| 180 |
* Bug Fix: Google+ Widget error.
|
| 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: 4.9
|
| 7 |
+
Stable tag: 2.0.20
|
| 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.20 =
|
| 150 |
+
* Please upgrade immediately. Bugfixes and improvements.
|
| 151 |
|
| 152 |
== Changelog ==
|
| 153 |
|
| 154 |
+
= 2.0.20 - 2018-09-19 =
|
| 155 |
+
* Bug Fix:: Add Compatibility of mb_convert_encoding() function.
|
| 156 |
+
|
| 157 |
= 2.0.19 - 2018-09-13 =
|
| 158 |
* Improvement: Warning: DOMDocument::loadHTML(): htmlParseEntityRef: no name in Entity
|
| 159 |
|
| 177 |
= 2.0.14 - 2018-03-20 =
|
| 178 |
* Bug Fix: Headers already sent on upgrade routine.
|
| 179 |
|
|
|
|
| 180 |
= 2.0.13 - 2018-03-20 =
|
| 181 |
* Bug Fix: Twitter share issue.
|
| 182 |
* Bug Fix: Google+ Widget error.
|
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';
|
|
@@ -1738,24 +1738,36 @@ class SimpleSocialButtonsPR {
|
|
| 1738 |
if ( empty( $text ) ) {
|
| 1739 |
return $text;
|
| 1740 |
}
|
| 1741 |
-
|
| 1742 |
-
|
| 1743 |
-
|
|
|
|
|
|
|
| 1744 |
$dom = new DOMDocument();
|
|
|
|
| 1745 |
$dom->loadHTML( mb_convert_encoding( $original_text, 'HTML-ENTITIES', 'UTF-8' ) );
|
| 1746 |
-
|
|
|
|
|
|
|
|
|
|
| 1747 |
$xpath = new DOMXPath( $dom );
|
| 1748 |
$xpath->registerNamespace( 'h', 'http://www.w3.org/1999/xhtml' );
|
| 1749 |
// using a loop in case there are multiple occurrences
|
| 1750 |
-
|
| 1751 |
|
| 1752 |
-
|
| 1753 |
-
|
| 1754 |
-
|
| 1755 |
-
|
| 1756 |
|
| 1757 |
-
|
| 1758 |
$text = wp_strip_all_tags( $dom->saveHTML() );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1759 |
|
| 1760 |
/*
|
| 1761 |
* wp_trim_words() for more detail
|
| 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.20
|
| 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.20';
|
| 34 |
public $pluginPrefix = 'ssb_pr_';
|
| 35 |
public $hideCustomMetaKey = '_ssb_hide';
|
| 36 |
private $fb_app_id = '891268654262273';
|
| 1738 |
if ( empty( $text ) ) {
|
| 1739 |
return $text;
|
| 1740 |
}
|
| 1741 |
+
try {
|
| 1742 |
+
// this will not show any warning if html not valid .
|
| 1743 |
+
libxml_use_internal_errors( true );
|
| 1744 |
+
// xamp
|
| 1745 |
+
|
| 1746 |
$dom = new DOMDocument();
|
| 1747 |
+
if ( function_exists( 'mb_convert_encoding' ) ) {
|
| 1748 |
$dom->loadHTML( mb_convert_encoding( $original_text, 'HTML-ENTITIES', 'UTF-8' ) );
|
| 1749 |
+
} else {
|
| 1750 |
+
// see @ https://stackoverflow.com/questions/11974008/alternative-to-mb-convert-encoding-with-html-entities-charset
|
| 1751 |
+
$dom->loadHTML( htmlspecialchars_decode( utf8_decode( htmlentities( $original_text, ENT_COMPAT, 'utf-8', false ) ) ) );
|
| 1752 |
+
}
|
| 1753 |
$xpath = new DOMXPath( $dom );
|
| 1754 |
$xpath->registerNamespace( 'h', 'http://www.w3.org/1999/xhtml' );
|
| 1755 |
// using a loop in case there are multiple occurrences
|
| 1756 |
+
foreach ( $xpath->query( "//div[contains(@class, 'simplesocialbuttons')]" ) as $node ) {
|
| 1757 |
|
| 1758 |
+
$paragraph_node = $node->parentNode;
|
| 1759 |
+
// echo '<pre>';
|
| 1760 |
+
// print_r( $paragraph_node );
|
| 1761 |
+
$node->parentNode->removeChild( $node );
|
| 1762 |
|
| 1763 |
+
}
|
| 1764 |
$text = wp_strip_all_tags( $dom->saveHTML() );
|
| 1765 |
+
} catch ( Exception $e ) {
|
| 1766 |
+
|
| 1767 |
+
//echo 'Caught exception: ', $e->getMessage(), "\n";
|
| 1768 |
+
$text = $text;
|
| 1769 |
+
|
| 1770 |
+
}
|
| 1771 |
|
| 1772 |
/*
|
| 1773 |
* wp_trim_words() for more detail
|
