Plugin Directory

Changeset 2090373


Ignore:
Timestamp:
05/18/2019 10:21:02 AM (7 years ago)
Author:
ankittiwaari
Message:

Updated compatibility information + Added admin pagea

Location:
ti-social-buttons
Files:
7 added
2 edited

Legend:

Unmodified
Added
Removed
  • ti-social-buttons/trunk/readme.txt

    r1570327 r2090373  
    11=== Plugin Name ===
    22Contributors: ankittiwaari
    3 Donate link: http://link.for/allowing/users/give/you/money
    43Tags: Social Media, Facebook share, Tweet
    54Requires at least: 3.7
    6 Tested up to: 4.7
    7 Stable tag: 1.1
     5Tested up to: 5.2
     6Stable tag: 2.0
    87License: GPLv2
    98License URI: http://www.gnu.org/licenses/gpl-2.0.html
  • ti-social-buttons/trunk/ti-social-buttons.php

    r1559135 r2090373  
    88Author URI: http://artofcoding.in.
    99*/
     10
     11require_once 'inc/pages.php';
    1012add_filter ( 'the_content', 'ti_social_buttons', 1 );
     13
    1114function ti_social_buttons( $content )
    1215{
    13     $url = get_permalink(get_queried_object_id());
     16  $show_on_pages = get_option('ti_show_on_pages');
     17  $show_on_posts = get_option('ti_show_on_posts');
     18  $show_on_front = get_option('ti_show_on_front');
     19
     20  if (is_page() && !$show_on_pages){
     21    return;
     22  }
     23
     24  if (is_single() && !$show_on_posts){
     25    return;
     26  }
     27
     28  if (is_front_page() && ! $show_on_front){
     29    return;
     30  }
     31
     32  $url = get_permalink(get_queried_object_id());
    1433    $twitter_html = '<div> <div style="float:left;position:relative;top:4px;margin-right:10px">';
    1534    $twitter_html .= '<a href="https://twitter.com/share" class="twitter-share-button" data-via="techinceptum" data-related="techinceptum">Tweet</a><script>!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+\'://platform.twitter.com/widgets.js\';fjs.parentNode.insertBefore(js,fjs);}}(document, \'script\', \'twitter-wjs\');</script>';
    16 $twitter_html .= '</div>';
    17 $fb_html = '<div id="fb-root"></div>
     35  $twitter_html .= '</div>';
     36  $fb_html = '<div id="fb-root"></div>
    1837<script>(function(d, s, id) {
    1938  var js, fjs = d.getElementsByTagName(s)[0];
     
    3655return $content . $twitter_html . $fb_html . $fb_comment;
    3756}
    38 ?>
Note: See TracChangeset for help on using the changeset viewer.