Changeset 2090373
- Timestamp:
- 05/18/2019 10:21:02 AM (7 years ago)
- Location:
- ti-social-buttons
- Files:
-
- 7 added
- 2 edited
-
tags/V2.0 (added)
-
tags/V2.0/changelog.txt (added)
-
tags/V2.0/inc (added)
-
tags/V2.0/inc/pages.php (added)
-
tags/V2.0/ti-social-buttons.php (added)
-
trunk/inc (added)
-
trunk/inc/pages.php (added)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/ti-social-buttons.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ti-social-buttons/trunk/readme.txt
r1570327 r2090373 1 1 === Plugin Name === 2 2 Contributors: ankittiwaari 3 Donate link: http://link.for/allowing/users/give/you/money4 3 Tags: Social Media, Facebook share, Tweet 5 4 Requires at least: 3.7 6 Tested up to: 4.77 Stable tag: 1.15 Tested up to: 5.2 6 Stable tag: 2.0 8 7 License: GPLv2 9 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html -
ti-social-buttons/trunk/ti-social-buttons.php
r1559135 r2090373 8 8 Author URI: http://artofcoding.in. 9 9 */ 10 11 require_once 'inc/pages.php'; 10 12 add_filter ( 'the_content', 'ti_social_buttons', 1 ); 13 11 14 function ti_social_buttons( $content ) 12 15 { 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()); 14 33 $twitter_html = '<div> <div style="float:left;position:relative;top:4px;margin-right:10px">'; 15 34 $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> 18 37 <script>(function(d, s, id) { 19 38 var js, fjs = d.getElementsByTagName(s)[0]; … … 36 55 return $content . $twitter_html . $fb_html . $fb_comment; 37 56 } 38 ?>
Note: See TracChangeset
for help on using the changeset viewer.