Changeset 1252320
- Timestamp:
- 09/23/2015 09:15:27 PM (11 years ago)
- Location:
- thumbar/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (2 diffs)
-
thumbar-wp.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
thumbar/trunk/readme.txt
r1251968 r1252320 5 5 Requires at least: 2.6 6 6 Tested up to: 4.3 7 Stable tag: 1.04 27 Stable tag: 1.043 8 8 License: GPLv2 or later 9 9 … … 168 168 = 1.042 = 169 169 * excerpt support added 170 171 = 1.043 = 172 * excerpt support rolled back -
thumbar/trunk/thumbar-wp.php
r1251968 r1252320 2 2 /* 3 3 Plugin Name: Thumbar 4 Plugin URI: https://www.thumbar.com /plugin/thumbar-wp.zip4 Plugin URI: https://www.thumbar.com 5 5 Description: Rates your posts and mirrors them and their ratings in real time for free at Thumbar.com to maximize their exposure. Replaces search engines and SEO for generating traffic. 6 6 Version: 1.0 … … 9 9 */ 10 10 11 add_filter('the_excerpt', 'thumbar');12 11 add_filter('the_content', 'thumbar'); 13 12 add_action('init', 'register_tb_script'); … … 15 14 16 15 function thumbar($content) { 17 global $add_tb_script;16 global $add_tb_script; 18 17 19 $thumbar_add_on = '<style type="text/css"> .thumbar {margin:0px;border:0px;padding:0px;width:150px;height:25px;}</style><div class="thumbar" uid="x"></div><br>';20 $theContent = $content.$thumbar_add_on;21 $add_tb_script = true;18 $thumbar_add_on = '<style type="text/css"> .thumbar {margin:0px;border:0px;padding:0px;width:150px;height:25px;}</style><div class="thumbar" uid="1"></div><br>'; 19 $theContent = $content.$thumbar_add_on; 20 $add_tb_script = true; 22 21 23 return ($theContent);22 return ($theContent); 24 23 } 25 24 26 25 function register_tb_script() { 27 wp_register_script('tb-script', 'https://www.thumbar.com/js/wp_link.js', array('jquery'), '1.0', true);26 wp_register_script('tb-script', 'https://www.thumbar.com/js/wp_link.js', array('jquery'), '1.0', true); 28 27 } 29 28 30 29 function print_tb_script() { 31 global $add_tb_script;30 global $add_tb_script; 32 31 33 while (!$add_tb_script)32 while (!$add_tb_script) 34 33 return; 35 34 36 wp_print_scripts('tb-script');35 wp_print_scripts('tb-script'); 37 36 } 38 37 ?>
Note: See TracChangeset
for help on using the changeset viewer.