Changeset 544549
- Timestamp:
- 05/15/2012 04:05:48 PM (14 years ago)
- Location:
- seo-facebook-comments/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (3 diffs)
-
seofacebook.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
seo-facebook-comments/trunk/readme.txt
r533346 r544549 9 9 Requires at least: 2.9 10 10 11 Tested up to: 3.3. 112 13 Stable tag: 1.4. 411 Tested up to: 3.3.2 12 13 Stable tag: 1.4.5 14 14 15 15 This plugin will insert a Facebook Comment Form, Open Graph Tags and ALSO insert all Facebook Comments into your Wordpress Database for better SEO. … … 102 102 103 103 == Changelog == 104 105 = 1.4.5 = 106 107 * <strong>FIXED</strong> Comments are saved/retrieved through the page permalink, and not by it's id 108 * <strong>TWEAK</strong> Updated Javascript SDK 104 109 105 110 = 1.4.4 = … … 194 199 == Upgrade Notice == 195 200 201 = 1.4.5 = 202 203 * Fixes and Tweaks. Upgrade Highly Advisable 204 196 205 = 1.4.4 = 197 206 -
seo-facebook-comments/trunk/seofacebook.php
r533362 r544549 4 4 * Plugin URI: http://www.plulz.com 5 5 * Description: This plugin will insert a Facebook Comment Form, Open Graph Tags and ALSO insert all Facebook Comments into your Wordpress Database for better SEO. 6 * Version: 1.4. 46 * Version: 1.4.5 7 7 * Author: Fabio Zaffani 8 8 * Author URI: http://www.plulz.com … … 308 308 { 309 309 if (!isset($this->options['openGraphTags']) ) 310 { 310 311 return; 311 312 global $wp_query; 313 314 $postId = $wp_query->post->ID; 315 316 //$postUrl = get_permalink($postId); 317 318 $siteName = get_bloginfo('name'); 319 $appId = $this->options['app']; 320 321 if ( is_home() || is_search() ) 322 { 323 $postTitle = $siteName; 324 $postUrl = home_url(); 312 } 313 314 global $wp_query; 315 316 $postId = $wp_query->post->ID; 317 $postUrl = get_permalink($postId); 318 $siteName = get_bloginfo('name'); 319 $appId = $this->options['app']; 320 321 if ( is_home() || is_search() ) 322 { 323 $postTitle = $siteName; 325 324 } 326 325 else if ( is_category() ) 327 { 328 $category = get_the_category(); 329 $postTitle = $category[0]->cat_name . ' - ' . $siteName; 330 $postUrl = home_url('?cat='.$category[0]->term_id); 331 } 332 else 333 { 334 $postUrl = home_url('?p='.$postId); 326 { 327 $category = get_the_category(); 328 $postTitle = $category[0]->cat_name . ' - ' . $siteName; 329 } 330 else 331 { 335 332 $postTitle = single_post_title('', false); 336 333 } 334 337 335 338 336 // Avoid OG errors by making sure exists a Admin ID … … 368 366 $lang = $this->options['language']; 369 367 370 $js = " <div id='fb-root'></div> 371 <script> 372 window.fbAsyncInit = function() { 373 FB.init({ 374 appId : {$appID}, 375 status : true, // check login status 376 cookie : true, // enable cookies to allow the server to access the session 377 xfbml : true // parse XFBML 378 }); 379 }; 380 381 (function() { 382 var e = document.createElement('script'); 383 e.src = document.location.protocol + '//connect.facebook.net/{$lang}/all.js'; 384 e.async = true; 385 document.getElementById('fb-root').appendChild(e); 386 }()); 387 </script>"; 388 389 echo $js; 368 $js = "<div id='fb-root'></div> 369 <script type=\"text/javascript\"> 370 window.fbAsyncInit = function() { 371 FB.init({ 372 appId : '{$appID}', // App ID 373 status : true, // check login status 374 cookie : true, // enable cookies to allow the server to access the session 375 xfbml : true // parse XFBML 376 }); 377 378 // Additional initialization code here 379 }; 380 381 // Load the SDK Asynchronously 382 (function(d){ 383 var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0]; 384 if (d.getElementById(id)) {return;} 385 js = d.createElement('script'); js.id = id; js.async = true; 386 js.src = \"//connect.facebook.net/{$lang}/all.js\"; 387 ref.parentNode.insertBefore(js, ref); 388 }(document)) 389 </script>"; 390 391 echo $js; 390 392 } 391 393
Note: See TracChangeset
for help on using the changeset viewer.