Changeset 407700
- Timestamp:
- 07/10/2011 03:46:49 AM (15 years ago)
- Location:
- facebook-likes-you/trunk
- Files:
-
- 2 edited
-
facebook-likes-you.php (modified) (6 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
facebook-likes-you/trunk/facebook-likes-you.php
r406651 r407700 4 4 Plugin URI: http://www.sproject.name/download/wp-facebook-likes-you/ 5 5 Description: Facebook Likes You! is simple plugin which makes it easy to add Facebook Like button and widgetable Like box. It's fully configurable, so you can decide where to append the button. 6 Version: 1.3. 26 Version: 1.3.3 7 7 Author: Piotr Sochalewski 8 8 Author URI: http://www.sproject.name/ … … 245 245 } 246 246 247 function fb_like_count_margin() { 248 global $fb_like_settings; 249 250 return $fb_like_settings['margin_top'] . 'px ' 251 . $fb_like_settings['margin_right'] . 'px ' 252 . $fb_like_settings['margin_bottom'] . 'px ' 253 . $fb_like_settings['margin_left'] . 'px'; 254 } 255 247 256 /* Generate code for Google +1 Button. Nothing more. */ 248 function generate_google1() {257 function fb_like_generate_google1() { 249 258 global $fb_like_settings; 250 259 … … 252 261 switch($fb_like_settings['layout']) { 253 262 case "standard": 254 return '<div style="float: right; "><g:plusone href="' . get_permalink() . '"></g:plusone></div>';263 return '<div style="float: right; margin: ' . fb_like_count_margin() . '"><g:plusone href="' . get_permalink() . '"></g:plusone></div>'; 255 264 break; 256 265 case "button_count": 257 return '<div style="float: right; "><g:plusone size="medium" href="' . get_permalink() . '"></g:plusone></div>';266 return '<div style="float: right; margin: ' . fb_like_count_margin() . '"><g:plusone size="medium" href="' . get_permalink() . '"></g:plusone></div>'; 258 267 break; 259 268 case "standard (show faces)": case "box_count": 260 return '<div style="float: right; "><g:plusone size="tall" href="' . get_permalink() . '"></g:plusone></div>';269 return '<div style="float: right; margin: ' . fb_like_count_margin() . '"><g:plusone size="tall" href="' . get_permalink() . '"></g:plusone></div>'; 261 270 break; 262 271 } … … 268 277 global $fb_like_settings; 269 278 270 $margin = $fb_like_settings['margin_top'] . 'px ' 271 . $fb_like_settings['margin_right'] . 'px ' 272 . $fb_like_settings['margin_bottom'] . 'px ' 273 . $fb_like_settings['margin_left'] . 'px'; 279 $margin = fb_like_count_margin(); 274 280 275 281 if($fb_like_settings['xfbml']) { … … 306 312 $url .= ($fb_like_settings['css_style']!='') ? ' ' . $fb_like_settings['css_style'] . '"' : '"'; 307 313 308 return '<div id="fb-root"></div><script src="http://connect.facebook.net/' . $locale . '/all.js#appId=' . fb_like_return_appid() . '&xfbml=1" type="text/javascript"></script> <fb:like' . $url . '></fb:like>' . generate_google1();314 return '<div id="fb-root"></div><script src="http://connect.facebook.net/' . $locale . '/all.js#appId=' . fb_like_return_appid() . '&xfbml=1" type="text/javascript"></script> <fb:like' . $url . '></fb:like>' . fb_like_generate_google1(); 309 315 /* END OF XFBML VERSION */ 310 316 } … … 336 342 337 343 if($fb_like_settings['html5']) 338 return $url.'" style="scrolling:no; allowTransparency:true; border:none; overflow:hidden; width:'.$fb_like_settings['width'].'px; height:'.$height.'px; margin:'.$margin.'; '.$fb_like_settings['css_style'].'"></iframe>' . generate_google1();344 return $url.'" style="scrolling:no; allowTransparency:true; border:none; overflow:hidden; width:'.$fb_like_settings['width'].'px; height:'.$height.'px; margin:'.$margin.'; '.$fb_like_settings['css_style'].'"></iframe>' . fb_like_generate_google1(); 339 345 else 340 return $url.'" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:'.$fb_like_settings['width'].'px; height:'.$height.'px; margin:'.$margin.'; '.$fb_like_settings['css_style'].'" allowTransparency="true"></iframe>' . generate_google1();346 return $url.'" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:'.$fb_like_settings['width'].'px; height:'.$height.'px; margin:'.$margin.'; '.$fb_like_settings['css_style'].'" allowTransparency="true"></iframe>' . fb_like_generate_google1(); 341 347 /* END OF STANDARD (NON-XFBML) VERSION */ 342 348 } -
facebook-likes-you/trunk/readme.txt
r406651 r407700 5 5 Requires at least: 2.9 6 6 Tested up to: 3.2 7 Stable tag: 1.3. 27 Stable tag: 1.3.3 8 8 9 9 Facebook Likes You! is simple plugin which makes it easy to add Like Button and widgetable Like Box. Google +1 Button isn't a problem too! … … 45 45 46 46 == Changelog == 47 48 = 1.3.3 = 49 * Margins work for Google +1 Button too 47 50 48 51 = 1.3.2 =
Note: See TracChangeset
for help on using the changeset viewer.