WordPress.org

Plugin Directory

Changeset 1810282


Ignore:
Timestamp:
01/27/18 01:54:53 (3 weeks ago)
Author:
hiddenpearls
Message:

2.0.9 - 2018-01-27

  • Bug Fix: facebook share - meta tags.
  • Bug Fix: Youtube Widget bug.
Location:
simple-social-buttons
Files:
3 edited
28 copied

Legend:

Unmodified
Added
Removed
  • simple-social-buttons/tags/2.0.9/inc/ssb-widget-front.php

    r1808337 r1810282  
    1919     if( $display == $show_youtube): 
    2020    ?> 
    21     <a class="ssb_button simplesocial-yt-follow" rel="nofollow" href="https://youtube.com/user/<?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> 
     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> 
    2222    <?php endif;?> 
    2323    <?php if ( $display == $show_pinterest ):?> 
  • simple-social-buttons/tags/2.0.9/readme.txt

    r1808337 r1810282  
    55Requires at least: 4.0 
    66Tested up to: 4.9 
    7 Stable tag: 2.0.8 
     7Stable tag: 2.0.9 
    88License: GPLv2 or later 
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html 
     
    147147== Upgrade Notice == 
    148148 
    149 = 2.0.8 = 
     149= 2.0.9 = 
    150150* 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! 
    151151 
    152152 
    153153== Changelog == 
     154 
     155 
     156= 2.0.9 - 2018-01-27 = 
     157* Bug Fix: facebook share - meta tags. 
     158* Bug Fix: Youtube Widget bug. 
     159 
    154160 
    155161= 2.0.8 - 2018-01-24 = 
  • simple-social-buttons/tags/2.0.9/simple-social-buttons.php

    r1808337 r1810282  
    44 * Plugin URI: http://www.WPBrigade.com/wordpress/plugins/simple-social-buttons/ 
    55 * 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.8 
     6 * Version: 2.0.9 
    77 * Author: WPBrigade 
    88 * Author URI: http://www.WPBrigade.com/ 
     
    3131class SimpleSocialButtonsPR { 
    3232    public $pluginName        = 'Simple Social Buttons'; 
    33     public $pluginVersion     = '2.0.8'; 
     33    public $pluginVersion     = '2.0.9'; 
    3434    public $pluginPrefix      = 'ssb_pr_'; 
    3535    public $hideCustomMetaKey = '_ssb_hide'; 
     
    112112 
    113113        add_shortcode( 'SSB', array( $this, 'short_code_content' ) ); 
     114        add_action( 'wp_head', array( $this, 'add_meta_tags' ) ); 
     115 
    114116    } 
    115117 
     
    12911293    } 
    12921294 
     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 
    12931345} // end class 
    12941346 
  • simple-social-buttons/trunk/inc/ssb-widget-front.php

    r1808337 r1810282  
    1919     if( $display == $show_youtube): 
    2020    ?> 
    21     <a class="ssb_button simplesocial-yt-follow" rel="nofollow" href="https://youtube.com/user/<?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> 
     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> 
    2222    <?php endif;?> 
    2323    <?php if ( $display == $show_pinterest ):?> 
  • simple-social-buttons/trunk/readme.txt

    r1808337 r1810282  
    55Requires at least: 4.0 
    66Tested up to: 4.9 
    7 Stable tag: 2.0.8 
     7Stable tag: 2.0.9 
    88License: GPLv2 or later 
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html 
     
    147147== Upgrade Notice == 
    148148 
    149 = 2.0.8 = 
     149= 2.0.9 = 
    150150* 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! 
    151151 
    152152 
    153153== Changelog == 
     154 
     155 
     156= 2.0.9 - 2018-01-27 = 
     157* Bug Fix: facebook share - meta tags. 
     158* Bug Fix: Youtube Widget bug. 
     159 
    154160 
    155161= 2.0.8 - 2018-01-24 = 
  • simple-social-buttons/trunk/simple-social-buttons.php

    r1808337 r1810282  
    44 * Plugin URI: http://www.WPBrigade.com/wordpress/plugins/simple-social-buttons/ 
    55 * 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.8 
     6 * Version: 2.0.9 
    77 * Author: WPBrigade 
    88 * Author URI: http://www.WPBrigade.com/ 
     
    3131class SimpleSocialButtonsPR { 
    3232    public $pluginName        = 'Simple Social Buttons'; 
    33     public $pluginVersion     = '2.0.8'; 
     33    public $pluginVersion     = '2.0.9'; 
    3434    public $pluginPrefix      = 'ssb_pr_'; 
    3535    public $hideCustomMetaKey = '_ssb_hide'; 
     
    112112 
    113113        add_shortcode( 'SSB', array( $this, 'short_code_content' ) ); 
     114        add_action( 'wp_head', array( $this, 'add_meta_tags' ) ); 
     115 
    114116    } 
    115117 
     
    12911293    } 
    12921294 
     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 
    12931345} // end class 
    12941346 
Note: See TracChangeset for help on using the changeset viewer.