Version Description
- Relaunched with a whole set of NEW FEATURES and Improvement. Please upgrade immediately and provide your feedback. highly recommended. Apologies in advance, if anything breaks!
=
Download this release
Release Info
Developer | hiddenpearls |
Plugin | Simple Social Media Share Buttons – Social Sharing for Everyone |
Version | 2.0.9 |
Comparing to | |
See all releases |
Code changes from version 2.0.8 to 2.0.9
- inc/ssb-widget-front.php +1 -1
- readme.txt +8 -2
- simple-social-buttons.php +54 -2
inc/ssb-widget-front.php
CHANGED
@@ -18,7 +18,7 @@ if ( !empty( $widget_title ) ) {
|
|
18 |
<?php endif;
|
19 |
if( $display == $show_youtube):
|
20 |
?>
|
21 |
-
<a class="ssb_button simplesocial-yt-follow" rel="nofollow" href="https://youtube.com
|
22 |
<?php endif;?>
|
23 |
<?php if ( $display == $show_pinterest ):?>
|
24 |
<a class="ssb_button simplesocial-pinterest-follow" rel="nofollow" href="https://pinterest.com/<?php echo $pinterest_id;?>/" target="_blank"><span class="simplesocialtxt"><?php echo $pinterest_text;?> </span><span class="widget_counter"> <?php echo ( $display == $pinterest_show_counter )? $pinterest_follower: '';?> </span></a>
|
18 |
<?php endif;
|
19 |
if( $display == $show_youtube):
|
20 |
?>
|
21 |
+
<a class="ssb_button simplesocial-yt-follow" rel="nofollow" href="https://youtube.com/<?php echo $youtube_type ?>/<?php echo $youtube_id ?>" target="_blank"><span class="simplesocialtxt"><?php echo $youtube_text?> </span><span class="widget_counter"> <?php echo ( $display == $youtube_show_counter)?$youtube_subscriber:" ";?> </span></a>
|
22 |
<?php endif;?>
|
23 |
<?php if ( $display == $show_pinterest ):?>
|
24 |
<a class="ssb_button simplesocial-pinterest-follow" rel="nofollow" href="https://pinterest.com/<?php echo $pinterest_id;?>/" target="_blank"><span class="simplesocialtxt"><?php echo $pinterest_text;?> </span><span class="widget_counter"> <?php echo ( $display == $pinterest_show_counter )? $pinterest_follower: '';?> </span></a>
|
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,12 +146,18 @@ theme = theme1 or theme2 or theme3 or theme4 or Flat or Circle or Official
|
|
146 |
|
147 |
== Upgrade Notice ==
|
148 |
|
149 |
-
= 2.0.
|
150 |
* Relaunched with a whole set of NEW FEATURES and Improvement. Please upgrade immediately and provide your feedback. highly recommended. Apologies in advance, if anything breaks!
|
151 |
|
152 |
|
153 |
== Changelog ==
|
154 |
|
|
|
|
|
|
|
|
|
|
|
|
|
155 |
= 2.0.8 - 2018-01-24 =
|
156 |
* Bug Fix: Google Plus issue on widget.
|
157 |
* Bug Fix: Hide SideBar up to IPad Mini.
|
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.9
|
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.9 =
|
150 |
* Relaunched with a whole set of NEW FEATURES and Improvement. Please upgrade immediately and provide your feedback. highly recommended. Apologies in advance, if anything breaks!
|
151 |
|
152 |
|
153 |
== Changelog ==
|
154 |
|
155 |
+
|
156 |
+
= 2.0.9 - 2018-01-27 =
|
157 |
+
* Bug Fix: facebook share - meta tags.
|
158 |
+
* Bug Fix: Youtube Widget bug.
|
159 |
+
|
160 |
+
|
161 |
= 2.0.8 - 2018-01-24 =
|
162 |
* Bug Fix: Google Plus issue on widget.
|
163 |
* Bug Fix: Hide SideBar up to IPad Mini.
|
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 |
|
@@ -111,6 +111,8 @@ class SimpleSocialButtonsPR {
|
|
111 |
add_action( 'wp_footer', array( $this, 'fblike_script' ) );
|
112 |
|
113 |
add_shortcode( 'SSB', array( $this, 'short_code_content' ) );
|
|
|
|
|
114 |
}
|
115 |
|
116 |
function set_selected_networks() {
|
@@ -1290,6 +1292,56 @@ class SimpleSocialButtonsPR {
|
|
1290 |
return $ssb_buttonscode;
|
1291 |
}
|
1292 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1293 |
} // end class
|
1294 |
|
1295 |
|
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.9
|
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.9';
|
34 |
public $pluginPrefix = 'ssb_pr_';
|
35 |
public $hideCustomMetaKey = '_ssb_hide';
|
36 |
|
111 |
add_action( 'wp_footer', array( $this, 'fblike_script' ) );
|
112 |
|
113 |
add_shortcode( 'SSB', array( $this, 'short_code_content' ) );
|
114 |
+
add_action( 'wp_head', array( $this, 'add_meta_tags' ) );
|
115 |
+
|
116 |
}
|
117 |
|
118 |
function set_selected_networks() {
|
1292 |
return $ssb_buttonscode;
|
1293 |
}
|
1294 |
|
1295 |
+
|
1296 |
+
/**
|
1297 |
+
* Add Meta Tags
|
1298 |
+
*
|
1299 |
+
* @param int $post_id
|
1300 |
+
* @since 2.0.9
|
1301 |
+
* @return string
|
1302 |
+
*/
|
1303 |
+
function add_meta_tags() {
|
1304 |
+
|
1305 |
+
if ( class_exists( 'Jetpack' ) ) { // Check jetpack active.
|
1306 |
+
return;
|
1307 |
+
} else if( defined( 'WPSEO_VERSION' ) ) { // Check jetpack active.
|
1308 |
+
return;
|
1309 |
+
}
|
1310 |
+
|
1311 |
+
echo PHP_EOL . '<!-- Open Graph Meta Tags generated by Simple Social Buttons ' . $this->pluginVersion . ' -->' . PHP_EOL;
|
1312 |
+
echo '<meta property="og:title" content="'. get_the_title() ." - ". get_bloginfo( 'name' ) .'" />' . PHP_EOL;
|
1313 |
+
echo '<meta property="og:description" content="'. $this->get_excerpt_by_id( get_the_id() ) .'" />' . PHP_EOL;
|
1314 |
+
echo '<meta property="og:url" content="'. get_permalink() .'" />' . PHP_EOL;
|
1315 |
+
echo '<meta property="og:site_name" content="'. get_bloginfo( 'name' ) .'" />' . PHP_EOL;
|
1316 |
+
}
|
1317 |
+
|
1318 |
+
/**
|
1319 |
+
* Get the excerpt
|
1320 |
+
*
|
1321 |
+
* @param int $post_id
|
1322 |
+
* @since 2.0.9
|
1323 |
+
* @return string
|
1324 |
+
*/
|
1325 |
+
function get_excerpt_by_id( $post_id ) {
|
1326 |
+
// Check if the post has an excerpt
|
1327 |
+
if( has_excerpt() ) {
|
1328 |
+
$excerpt_length = apply_filters( 'excerpt_length', 35 );
|
1329 |
+
return trim( get_the_excerpt() );
|
1330 |
+
}
|
1331 |
+
|
1332 |
+
$the_post = get_post( $post_id ); //Gets post ID
|
1333 |
+
$the_excerpt = $the_post->post_content; //Gets post_content to be used as a basis for the excerpt
|
1334 |
+
$excerpt_length = 60; //Sets excerpt length by words
|
1335 |
+
$the_excerpt = strip_tags( strip_shortcodes( $the_excerpt ) ); //Strips tags and images
|
1336 |
+
$words = explode( ' ', $the_excerpt, $excerpt_length + 1 );
|
1337 |
+
if( count( $words ) > $excerpt_length ) {
|
1338 |
+
array_pop( $words );
|
1339 |
+
$the_excerpt = implode( ' ', $words );
|
1340 |
+
}
|
1341 |
+
|
1342 |
+
return trim( wp_strip_all_tags( $the_excerpt ) );
|
1343 |
+
}
|
1344 |
+
|
1345 |
} // end class
|
1346 |
|
1347 |
|