Version Description
- Please upgrade immediately. Bugfixes and improvements.
=
Download this release
Release Info
| Developer | hiddenpearls |
| Plugin | |
| Version | 2.0.21 |
| Comparing to | |
| See all releases | |
Code changes from version 2.0.20 to 2.0.21
- assets/css/admin.css +13 -0
- assets/css/front.css +42 -2
- classes/ssb-admin.php +0 -2
- classes/ssb-settings-strucutre.php +41 -23
- readme.txt +13 -5
- simple-social-buttons.php +55 -17
- ssb-social-counts/twitter.php +1 -1
assets/css/admin.css
CHANGED
|
@@ -1979,3 +1979,16 @@ html[dir="rtl"] .simplesocial-inline-form-section label{
|
|
| 1979 |
margin-left: 40px;
|
| 1980 |
}
|
| 1981 |
/*===== End of Code RTL Share Button ======*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1979 |
margin-left: 40px;
|
| 1980 |
}
|
| 1981 |
/*===== End of Code RTL Share Button ======*/
|
| 1982 |
+
|
| 1983 |
+
|
| 1984 |
+
/*===== Code for instruction ======*/
|
| 1985 |
+
|
| 1986 |
+
#ssb_instruction .ssb_instruct_heading{
|
| 1987 |
+
margin: 0 0 10px;
|
| 1988 |
+
}
|
| 1989 |
+
#ssb_instruction .ssb_step{
|
| 1990 |
+
font-size:14px;
|
| 1991 |
+
}
|
| 1992 |
+
|
| 1993 |
+
/*===== End Code for instruction ======*/
|
| 1994 |
+
|
assets/css/front.css
CHANGED
|
@@ -1124,8 +1124,8 @@ div[class*="simplesocialbuttons-float"].simplesocialbuttons.simplesocial-simple-
|
|
| 1124 |
.simplesocialbuttons.simplesocial-simple-round button.simplesocial-msng-share:after, .simplesocialbuttons.simplesocial-simple-round button.simplesocial-msng-share:before {
|
| 1125 |
background: #3c7be6;
|
| 1126 |
}
|
| 1127 |
-
.simplesocialbuttons.simplesocial-simple-round button.simplesocial-tumblr-share:after, .simplesocialbuttons.simplesocial-simple-round button.simplesocial-
|
| 1128 |
-
background: #
|
| 1129 |
}
|
| 1130 |
|
| 1131 |
|
|
@@ -2963,3 +2963,43 @@ div[class*="simplesocialbuttons-float"].simplesocial-simple-round button[class*
|
|
| 2963 |
/*========================================
|
| 2964 |
= End Code For widget =
|
| 2965 |
========================================*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1124 |
.simplesocialbuttons.simplesocial-simple-round button.simplesocial-msng-share:after, .simplesocialbuttons.simplesocial-simple-round button.simplesocial-msng-share:before {
|
| 1125 |
background: #3c7be6;
|
| 1126 |
}
|
| 1127 |
+
.simplesocialbuttons.simplesocial-simple-round button.simplesocial-tumblr-share:after, .simplesocialbuttons.simplesocial-simple-round button.simplesocial-tumblr-share:before {
|
| 1128 |
+
background: #233247;
|
| 1129 |
}
|
| 1130 |
|
| 1131 |
|
| 2963 |
/*========================================
|
| 2964 |
= End Code For widget =
|
| 2965 |
========================================*/
|
| 2966 |
+
|
| 2967 |
+
|
| 2968 |
+
/*========================================
|
| 2969 |
+
= Code For Woocommerce =
|
| 2970 |
+
========================================*/
|
| 2971 |
+
.woocommerce-product-details__short-description .simplesocialbuttons button {
|
| 2972 |
+
float: left;
|
| 2973 |
+
}
|
| 2974 |
+
.woocommerce-product-details__short-description .simplesocialbuttons::after {
|
| 2975 |
+
content: "";
|
| 2976 |
+
clear: both;
|
| 2977 |
+
display: table;
|
| 2978 |
+
}
|
| 2979 |
+
/*===== End of Code For Woocommerce ======*/
|
| 2980 |
+
/*========================================
|
| 2981 |
+
= End Code For Woocommerce =
|
| 2982 |
+
========================================*/
|
| 2983 |
+
|
| 2984 |
+
|
| 2985 |
+
|
| 2986 |
+
/*========================================
|
| 2987 |
+
= compaitabilty code =
|
| 2988 |
+
========================================*/
|
| 2989 |
+
/* twenty Ninteen */
|
| 2990 |
+
.entry .entry-content > .simplesocialbuttons > *:last-child, .entry .entry-summary >.simplesocialbuttons > * :last-child{
|
| 2991 |
+
margin-bottom: 5px;
|
| 2992 |
+
}
|
| 2993 |
+
.entry .entry-content > .simplesocialbuttons > *:first-child, .entry .entry-summary >.simplesocialbuttons > * :first-child{
|
| 2994 |
+
margin-top: 5px;
|
| 2995 |
+
}
|
| 2996 |
+
.simplesocialbuttons h2::before{
|
| 2997 |
+
display: none;
|
| 2998 |
+
}
|
| 2999 |
+
.simplesocialbuttons-flyin h2::before, .simplesocialbuttons-popup h2::before{
|
| 3000 |
+
display: none;
|
| 3001 |
+
}
|
| 3002 |
+
|
| 3003 |
+
/*========================================
|
| 3004 |
+
= End of compaitabilty code =
|
| 3005 |
+
========================================*/
|
classes/ssb-admin.php
CHANGED
|
@@ -25,7 +25,6 @@ if ( ! class_exists( 'SimpleSocialButtonsPR_Admin' ) ) :
|
|
| 25 |
add_action( 'admin_init', array( $this, 'review_notice' ) );
|
| 26 |
add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
|
| 27 |
add_action( 'in_admin_header', array( $this, 'skip_notices' ), 100000 );
|
| 28 |
-
|
| 29 |
}
|
| 30 |
|
| 31 |
/**
|
|
@@ -351,7 +350,6 @@ if ( ! class_exists( 'SimpleSocialButtonsPR_Admin' ) ) :
|
|
| 351 |
|
| 352 |
}
|
| 353 |
|
| 354 |
-
|
| 355 |
} // end SimpleSocialButtonsPR_Admin
|
| 356 |
|
| 357 |
endif;
|
| 25 |
add_action( 'admin_init', array( $this, 'review_notice' ) );
|
| 26 |
add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
|
| 27 |
add_action( 'in_admin_header', array( $this, 'skip_notices' ), 100000 );
|
|
|
|
| 28 |
}
|
| 29 |
|
| 30 |
/**
|
| 350 |
|
| 351 |
}
|
| 352 |
|
|
|
|
| 353 |
} // end SimpleSocialButtonsPR_Admin
|
| 354 |
|
| 355 |
endif;
|
classes/ssb-settings-strucutre.php
CHANGED
|
@@ -868,7 +868,7 @@ if ( ! class_exists( 'Ssb_Settings_Structure' ) ) :
|
|
| 868 |
*/
|
| 869 |
|
| 870 |
function show_forms() {
|
| 871 |
-
|
| 872 |
echo '<div class="metabox-holder">';
|
| 873 |
echo '<div id="poststuff">';
|
| 874 |
echo '<form method="post" action="options.php">';
|
|
@@ -878,7 +878,7 @@ if ( ! class_exists( 'Ssb_Settings_Structure' ) ) :
|
|
| 878 |
echo '</form>';
|
| 879 |
echo "</div>";
|
| 880 |
echo "</div>";
|
| 881 |
-
|
| 882 |
|
| 883 |
echo '<div class="ssb_settings_container ssb_advanced-tab group" id="ssb_advanced-tab-content">';
|
| 884 |
echo '<div class="metabox-holder">';
|
|
@@ -886,6 +886,7 @@ if ( ! class_exists( 'Ssb_Settings_Structure' ) ) :
|
|
| 886 |
echo '<form method="post" action="options.php">';
|
| 887 |
$this->do_settings_sections( 'ssb_advanced' );
|
| 888 |
settings_fields( 'ssb_advanced' );
|
|
|
|
| 889 |
submit_button();
|
| 890 |
echo '</form>';
|
| 891 |
echo "</div>";
|
|
@@ -896,6 +897,23 @@ if ( ! class_exists( 'Ssb_Settings_Structure' ) ) :
|
|
| 896 |
$this->script();
|
| 897 |
}
|
| 898 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 899 |
/**
|
| 900 |
* Prints out all settings sections added to a particular settings page
|
| 901 |
*
|
|
@@ -955,32 +973,32 @@ if ( ! class_exists( 'Ssb_Settings_Structure' ) ) :
|
|
| 955 |
* @param string $section Slug title of the settings section who's fields you want to show.
|
| 956 |
*/
|
| 957 |
function do_settings_fields($page, $section) {
|
| 958 |
-
|
| 959 |
|
| 960 |
-
|
| 961 |
-
|
| 962 |
|
| 963 |
-
|
| 964 |
-
|
| 965 |
|
| 966 |
-
|
| 967 |
-
|
| 968 |
-
|
| 969 |
|
| 970 |
-
|
| 971 |
//
|
| 972 |
-
|
| 973 |
-
|
| 974 |
-
|
| 975 |
-
|
| 976 |
-
|
| 977 |
-
|
| 978 |
-
|
| 979 |
-
|
| 980 |
-
|
| 981 |
-
|
| 982 |
-
|
| 983 |
-
|
| 984 |
}
|
| 985 |
|
| 986 |
|
| 868 |
*/
|
| 869 |
|
| 870 |
function show_forms() {
|
| 871 |
+
echo '<div class="ssb_settings_container ssb_settings-tab group" id="ssb_settings-tab-content">';
|
| 872 |
echo '<div class="metabox-holder">';
|
| 873 |
echo '<div id="poststuff">';
|
| 874 |
echo '<form method="post" action="options.php">';
|
| 878 |
echo '</form>';
|
| 879 |
echo "</div>";
|
| 880 |
echo "</div>";
|
| 881 |
+
echo '</div>';
|
| 882 |
|
| 883 |
echo '<div class="ssb_settings_container ssb_advanced-tab group" id="ssb_advanced-tab-content">';
|
| 884 |
echo '<div class="metabox-holder">';
|
| 886 |
echo '<form method="post" action="options.php">';
|
| 887 |
$this->do_settings_sections( 'ssb_advanced' );
|
| 888 |
settings_fields( 'ssb_advanced' );
|
| 889 |
+
$this->render_instruction();
|
| 890 |
submit_button();
|
| 891 |
echo '</form>';
|
| 892 |
echo "</div>";
|
| 897 |
$this->script();
|
| 898 |
}
|
| 899 |
|
| 900 |
+
|
| 901 |
+
function render_instruction(){
|
| 902 |
+
|
| 903 |
+
echo '<div class="postbox " id="ssb_instruction">
|
| 904 |
+
<div class="inside">
|
| 905 |
+
<h3 class="">Instructions</h3>
|
| 906 |
+
<div class="postbox-content">
|
| 907 |
+
<h4 class="ssb_instruct_heading">Twitter count tracking requires the following steps:</h4>
|
| 908 |
+
<p> '. __( '<span class="ssb_step">Step 1: </span> <a target="_blank" href="http://twitcount.com">Click here </a> to visit twitcount.com', 'simple-social-buttons') . '</p>
|
| 909 |
+
<p> '. __( '<span class="ssb_step">Step 2: </span> Click the Button “Give Me My Twitter Count Back” on their website to create an account. If you see a prompt to customize your button, ignore to click paste code. ', 'simple-social-buttons' ) . '</p>
|
| 910 |
+
<p> '. __( '<span class="ssb_step">Step 3: </span> After creating an account Click “Account and Settings” tab then add your website click save button to track your Twitter share counts.', 'simple-social-buttons' ) . '</p>
|
| 911 |
+
</div>
|
| 912 |
+
</div>
|
| 913 |
+
</div>';
|
| 914 |
+
|
| 915 |
+
}
|
| 916 |
+
|
| 917 |
/**
|
| 918 |
* Prints out all settings sections added to a particular settings page
|
| 919 |
*
|
| 973 |
* @param string $section Slug title of the settings section who's fields you want to show.
|
| 974 |
*/
|
| 975 |
function do_settings_fields($page, $section) {
|
| 976 |
+
global $wp_settings_fields;
|
| 977 |
|
| 978 |
+
if ( ! isset( $wp_settings_fields[$page][$section] ) )
|
| 979 |
+
return;
|
| 980 |
|
| 981 |
+
foreach ( (array) $wp_settings_fields[$page][$section] as $field ) {
|
| 982 |
+
$class = '';
|
| 983 |
|
| 984 |
+
if ( ! empty( $field['args']['class'] ) ) {
|
| 985 |
+
$class = ' class="' . esc_attr( $field['args']['class'] ) . '"';
|
| 986 |
+
}
|
| 987 |
|
| 988 |
+
// echo "<tr{$class}>";
|
| 989 |
//
|
| 990 |
+
// if ( ! empty( $field['args']['label_for'] ) ) {
|
| 991 |
+
// echo '<th scope="row"><label for="' . esc_attr( $field['args']['label_for'] ) . '">' . $field['title'] . '</label></th>';
|
| 992 |
+
// } else {
|
| 993 |
+
// echo '<th scope="row">' . $field['title'] . '</th>';
|
| 994 |
+
// }
|
| 995 |
+
|
| 996 |
+
// echo '<td>';
|
| 997 |
+
|
| 998 |
+
call_user_func($field['callback'], $field['args']);
|
| 999 |
+
// echo '</td>';
|
| 1000 |
+
// echo '</tr>';
|
| 1001 |
+
}
|
| 1002 |
}
|
| 1003 |
|
| 1004 |
|
readme.txt
CHANGED
|
@@ -3,8 +3,8 @@ Contributors: hiddenpearls, WPBrigade
|
|
| 3 |
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:
|
| 7 |
-
Stable tag: 2.0.
|
| 8 |
License: GPLv2 or later
|
| 9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
| 10 |
|
|
@@ -131,7 +131,7 @@ counter = true or false
|
|
| 131 |
align = left or right or centered
|
| 132 |
order = googleplus,twitter,pinterest,fbshare,linkedin,reddit,whatsapp,viber,fblike
|
| 133 |
theme = theme1 or theme2 or theme3 or theme4 or Flat or Circle or Official
|
| 134 |
-
like_button_size = small(default), large
|
| 135 |
== Screenshots ==
|
| 136 |
|
| 137 |
1. Drag and Drop Social media buttons.
|
|
@@ -146,13 +146,21 @@ 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.20 - 2018-09-19 =
|
| 155 |
-
* Bug Fix
|
| 156 |
|
| 157 |
= 2.0.19 - 2018-09-13 =
|
| 158 |
* Improvement: Warning: DOMDocument::loadHTML(): htmlParseEntityRef: no name in Entity
|
| 3 |
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.21
|
| 8 |
License: GPLv2 or later
|
| 9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
| 10 |
|
| 131 |
align = left or right or centered
|
| 132 |
order = googleplus,twitter,pinterest,fbshare,linkedin,reddit,whatsapp,viber,fblike
|
| 133 |
theme = theme1 or theme2 or theme3 or theme4 or Flat or Circle or Official
|
| 134 |
+
like_button_size = small(default), large
|
| 135 |
== Screenshots ==
|
| 136 |
|
| 137 |
1. Drag and Drop Social media buttons.
|
| 146 |
|
| 147 |
== Upgrade Notice ==
|
| 148 |
|
| 149 |
+
= 2.0.21 =
|
| 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.
|
| 157 |
+
* Compatibility: Twenty Ninteen theme Compatibility added.
|
| 158 |
+
* Bug Fix: 404 page `Unexpected token ;` js error fixed.
|
| 159 |
+
* Bug Fix: Ajax request call on every page.
|
| 160 |
+
|
| 161 |
+
|
| 162 |
= 2.0.20 - 2018-09-19 =
|
| 163 |
+
* Bug Fix: Add Compatibility of mb_convert_encoding() function.
|
| 164 |
|
| 165 |
= 2.0.19 - 2018-09-13 =
|
| 166 |
* Improvement: Warning: DOMDocument::loadHTML(): htmlParseEntityRef: no name in Entity
|
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';
|
|
@@ -86,12 +86,15 @@ class SimpleSocialButtonsPR {
|
|
| 86 |
|
| 87 |
add_action( 'plugins_loaded', array( $this, 'load_plugin_domain' ) );
|
| 88 |
|
|
|
|
|
|
|
|
|
|
| 89 |
/**
|
| 90 |
* Filter hooks
|
| 91 |
*/
|
| 92 |
-
add_filter( 'the_content', array( $this, 'insert_buttons' ) );
|
| 93 |
|
| 94 |
-
add_filter( 'the_excerpt', array( $this, 'insert_excerpt_buttons' ) );
|
| 95 |
|
| 96 |
add_filter( 'plugin_row_meta', array( $this, '_row_meta' ), 10, 2 );
|
| 97 |
|
|
@@ -193,14 +196,13 @@ class SimpleSocialButtonsPR {
|
|
| 193 |
function ssb_output_cache_trigger( $info ) {
|
| 194 |
|
| 195 |
// Return early if we're not on a single page or we have fresh cache.
|
| 196 |
-
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
}
|
| 200 |
// if is home or front page return info
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
|
| 204 |
// Return if we're on a WooCommerce account page.
|
| 205 |
if ( function_exists( 'is_account_page' ) && is_account_page() ) {
|
| 206 |
return $info;
|
|
@@ -246,7 +248,9 @@ class SimpleSocialButtonsPR {
|
|
| 246 |
if (if_ssb_exist) {
|
| 247 |
ssbPlugin.fetchFacebookShares();
|
| 248 |
}
|
| 249 |
-
})
|
|
|
|
|
|
|
| 250 |
<?php
|
| 251 |
$info['footer_output'] .= ob_get_clean();
|
| 252 |
|
|
@@ -272,6 +276,14 @@ class SimpleSocialButtonsPR {
|
|
| 272 |
|
| 273 |
|
| 274 |
function ssb_footer_functions() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 275 |
|
| 276 |
// Fetch a few variables.
|
| 277 |
$info['postID'] = get_the_ID();
|
|
@@ -286,6 +298,18 @@ class SimpleSocialButtonsPR {
|
|
| 286 |
echo $info['footer_output'];
|
| 287 |
echo '</script>';
|
| 288 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 289 |
}
|
| 290 |
|
| 291 |
|
|
@@ -399,7 +423,6 @@ class SimpleSocialButtonsPR {
|
|
| 399 |
if ( isset( $this->selected_position['inline'] ) && 'false' == get_post_meta( get_the_ID(), $this->hideCustomMetaKey, true ) ) {
|
| 400 |
$return = true;
|
| 401 |
}
|
| 402 |
-
|
| 403 |
return $return;
|
| 404 |
|
| 405 |
}
|
|
@@ -1504,7 +1527,7 @@ class SimpleSocialButtonsPR {
|
|
| 1504 |
|
| 1505 |
if ( class_exists( 'Jetpack' ) ) { // Check jetpack active.
|
| 1506 |
return;
|
| 1507 |
-
} elseif ( defined( 'WPSEO_VERSION' ) ) { // Check Yoast
|
| 1508 |
return;
|
| 1509 |
}
|
| 1510 |
$og_tag = '';
|
|
@@ -1742,7 +1765,6 @@ class SimpleSocialButtonsPR {
|
|
| 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' ) );
|
|
@@ -1763,8 +1785,8 @@ class SimpleSocialButtonsPR {
|
|
| 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 |
}
|
|
@@ -1797,6 +1819,22 @@ class SimpleSocialButtonsPR {
|
|
| 1797 |
return $text;
|
| 1798 |
}
|
| 1799 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1800 |
|
| 1801 |
|
| 1802 |
} // end class
|
| 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.21
|
| 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.21';
|
| 34 |
public $pluginPrefix = 'ssb_pr_';
|
| 35 |
public $hideCustomMetaKey = '_ssb_hide';
|
| 36 |
private $fb_app_id = '891268654262273';
|
| 86 |
|
| 87 |
add_action( 'plugins_loaded', array( $this, 'load_plugin_domain' ) );
|
| 88 |
|
| 89 |
+
|
| 90 |
+
$content_filter_priority = apply_filters( 'ssb_the_content_priority', 12 );
|
| 91 |
+
$excerpt_filter_priority = apply_filters( 'ssb_the_excerpt_priority', 12 );
|
| 92 |
/**
|
| 93 |
* Filter hooks
|
| 94 |
*/
|
| 95 |
+
add_filter( 'the_content', array( $this, 'insert_buttons' ), $content_filter_priority );
|
| 96 |
|
| 97 |
+
add_filter( 'the_excerpt', array( $this, 'insert_excerpt_buttons' ), $excerpt_filter_priority );
|
| 98 |
|
| 99 |
add_filter( 'plugin_row_meta', array( $this, '_row_meta' ), 10, 2 );
|
| 100 |
|
| 196 |
function ssb_output_cache_trigger( $info ) {
|
| 197 |
|
| 198 |
// Return early if we're not on a single page or we have fresh cache.
|
| 199 |
+
if ( ( ssb_is_cache_fresh( $info['postID'], true ) ) && empty( $_GET['ssb_cache'] ) ) {
|
| 200 |
+
return $info;
|
| 201 |
+
}
|
|
|
|
| 202 |
// if is home or front page return info
|
| 203 |
+
if ( is_home() || is_front_page() ) {
|
| 204 |
+
return $info;
|
| 205 |
+
}
|
| 206 |
// Return if we're on a WooCommerce account page.
|
| 207 |
if ( function_exists( 'is_account_page' ) && is_account_page() ) {
|
| 208 |
return $info;
|
| 248 |
if (if_ssb_exist) {
|
| 249 |
ssbPlugin.fetchFacebookShares();
|
| 250 |
}
|
| 251 |
+
});
|
| 252 |
+
|
| 253 |
+
|
| 254 |
<?php
|
| 255 |
$info['footer_output'] .= ob_get_clean();
|
| 256 |
|
| 276 |
|
| 277 |
|
| 278 |
function ssb_footer_functions() {
|
| 279 |
+
// Check it is 404 page or not single (page/post)
|
| 280 |
+
if ( is_404() || ! is_singular() ) {
|
| 281 |
+
return false;
|
| 282 |
+
}
|
| 283 |
+
|
| 284 |
+
if( ( $this->is_ssb_on( 'sidebar' ) || $this->is_ssb_on( 'inline' ) ) || ! empty( $_GET['ssb_cache'] ) ) {
|
| 285 |
+
|
| 286 |
+
|
| 287 |
|
| 288 |
// Fetch a few variables.
|
| 289 |
$info['postID'] = get_the_ID();
|
| 298 |
echo $info['footer_output'];
|
| 299 |
echo '</script>';
|
| 300 |
}
|
| 301 |
+
}
|
| 302 |
+
|
| 303 |
+
/**
|
| 304 |
+
* @See https://twitcount.com/ library for get twitter counts
|
| 305 |
+
*
|
| 306 |
+
* since 2.0.21
|
| 307 |
+
*/
|
| 308 |
+
if ( isset( $this->selected_networks['twitter'] ) ){
|
| 309 |
+
echo "<script type='text/javascript'>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://static1.twitcount.com/js/twitcount.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitcount_plugins');</script>";
|
| 310 |
+
}
|
| 311 |
+
|
| 312 |
+
|
| 313 |
}
|
| 314 |
|
| 315 |
|
| 423 |
if ( isset( $this->selected_position['inline'] ) && 'false' == get_post_meta( get_the_ID(), $this->hideCustomMetaKey, true ) ) {
|
| 424 |
$return = true;
|
| 425 |
}
|
|
|
|
| 426 |
return $return;
|
| 427 |
|
| 428 |
}
|
| 1527 |
|
| 1528 |
if ( class_exists( 'Jetpack' ) ) { // Check jetpack active.
|
| 1529 |
return;
|
| 1530 |
+
} elseif ( defined( 'WPSEO_VERSION' ) || defined( 'AIOSEOP_VERSION' ) ) { // Check ( Yoast , All in one Seo) Allactive.
|
| 1531 |
return;
|
| 1532 |
}
|
| 1533 |
$og_tag = '';
|
| 1765 |
// this will not show any warning if html not valid .
|
| 1766 |
libxml_use_internal_errors( true );
|
| 1767 |
// xamp
|
|
|
|
| 1768 |
$dom = new DOMDocument();
|
| 1769 |
if ( function_exists( 'mb_convert_encoding' ) ) {
|
| 1770 |
$dom->loadHTML( mb_convert_encoding( $original_text, 'HTML-ENTITIES', 'UTF-8' ) );
|
| 1785 |
}
|
| 1786 |
$text = wp_strip_all_tags( $dom->saveHTML() );
|
| 1787 |
} catch ( Exception $e ) {
|
| 1788 |
+
|
| 1789 |
+
// echo 'Caught exception: ', $e->getMessage(), "\n";
|
| 1790 |
$text = $text;
|
| 1791 |
|
| 1792 |
}
|
| 1819 |
return $text;
|
| 1820 |
}
|
| 1821 |
|
| 1822 |
+
/**
|
| 1823 |
+
* check is ssb on with position and post type
|
| 1824 |
+
*
|
| 1825 |
+
* @version 2.0.21
|
| 1826 |
+
*/
|
| 1827 |
+
function is_ssb_on( $position ){
|
| 1828 |
+
|
| 1829 |
+
$is_ajax_callback = true;
|
| 1830 |
+
if( ! in_array( $this->get_post_type(), $this->_get_settings( $position, 'posts', array() ) ) ){
|
| 1831 |
+
$is_ajax_callback = false;
|
| 1832 |
+
}
|
| 1833 |
+
|
| 1834 |
+
return $is_ajax_callback;
|
| 1835 |
+
|
| 1836 |
+
}
|
| 1837 |
+
|
| 1838 |
|
| 1839 |
|
| 1840 |
} // end class
|
ssb-social-counts/twitter.php
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
function ssb_twitter_generate_link( $url ) {
|
| 4 |
|
| 5 |
// Return the correct Twitter JSON endpoint URL
|
| 6 |
-
$request_url = '
|
| 7 |
return $request_url;
|
| 8 |
}
|
| 9 |
|
| 3 |
function ssb_twitter_generate_link( $url ) {
|
| 4 |
|
| 5 |
// Return the correct Twitter JSON endpoint URL
|
| 6 |
+
$request_url = 'https://counts.twitcount.com/counts.php?url=' . $url;
|
| 7 |
return $request_url;
|
| 8 |
}
|
| 9 |
|
