Changeset 648642
- Timestamp:
- 01/06/2013 09:08:27 AM (13 years ago)
- Location:
- seo-blogger-to-wordpress-301-redirector/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (2 diffs)
-
seo-blogger-to-wordpress.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
seo-blogger-to-wordpress-301-redirector/trunk/readme.txt
r583717 r648642 5 5 Requires at least: 2.6 6 6 Tested up to: 3.2.1 7 Stable tag: 0.4. 77 Stable tag: 0.4.8 8 8 9 9 This plugin will 301 redirect all incoming traffic from your Blogger account to your newly setup Wordpress account. Move from Blogger to wordpress with great ease. … … 69 69 == Upgrade Notice == 70 70 71 = 0.4. 7=72 Bug fix. 71 = 0.4.8 = 72 * Image Import bug fix -
seo-blogger-to-wordpress-301-redirector/trunk/seo-blogger-to-wordpress.php
r583717 r648642 4 4 Plugin URI: http://suhastech.com/seo-blogger-to-wordpress 5 5 Description: This plugin will 301 redirect all incoming traffic from your Blogger account to your newly setup Wordpress account. Please read the documentation at suhastech.com/seo-blogger-to-wordpress before you continue. 6 Version: 0.4. 76 Version: 0.4.8 7 7 Author: Suhas Sharma 8 8 Author URI: http://suhastech.com … … 201 201 if ((preg_match("/photobucket.com/i", $replace[0])) || (preg_match("/blogspot.com/i", $replace[0])) || (preg_match("/ggpht.com/i", $replace[0])) || (preg_match("/googleusercontent.com/i", $replace[0]))) 202 202 { 203 $upload = media_sideload_image( str_replace("+","%2B",urldecode(str_replace("+","%2B",trim($replace[0])))), $post->ID);203 $upload = media_sideload_image(urldecode(str_replace("+","%2B",trim($replace[0]))), $post->ID); 204 204 205 205 … … 238 238 if ((preg_match("/photobucket.com/i", $replace[0])) || (preg_match("/blogspot.com/i", $replace[0])) || (preg_match("/ggpht.com/i", $replace[0])) || (preg_match("/googleusercontent.com/i", $replace[0]))) 239 239 { 240 $upload = media_sideload_image( str_replace("+","%2B",urldecode(str_replace("+","%2B",trim($replace[0])))), $post->ID);240 $upload = media_sideload_image(urldecode(str_replace("+","%2B",trim($replace[0]))), $post->ID); 241 241 242 242 if ( !is_wp_error($upload) ) { … … 370 370 $req_uri = str_replace("/".end($subdirectory), "", $_SERVER['REQUEST_URI']); 371 371 $url = explode("?", $req_uri); 372 $res = $wpdb->get_results("SELECT post_id FROM $wpdb->postmeta WHERE meta_key = 'blogger_permalink' AND meta_value = '$url[0]'"); 372 $result = $wpdb->get_results("SELECT post_id FROM $wpdb->postmeta WHERE meta_key = 'blogger_permalink' AND meta_value = '$url[0]'"); 373 374 375 $res = array(); 376 377 foreach($result as $value_id){ 378 $rel_post_id = $value_id->post_id; 379 $rel_post = get_posts('p='.$rel_post_id) ; 380 if($rel_post) { 381 382 array_push($res, $value_id ); 383 break; 384 } 385 } 373 386 if(isset($res[0]->post_id)) 374 387 { … … 390 403 $permalink = preg_replace("/http:\\/\\/[a-z0-9-.]+/", "", $old_url); 391 404 $url = explode("?", $permalink); 392 $res = $wpdb->get_results("SELECT post_id FROM $wpdb->postmeta WHERE meta_key = 'blogger_permalink' AND meta_value = '$url[0]'"); 405 $result = $wpdb->get_results("SELECT post_id FROM $wpdb->postmeta WHERE meta_key = 'blogger_permalink' AND meta_value = '$url[0]'"); 406 407 $res = array(); 408 409 foreach($result as $value_id){ 410 $rel_post_id = $value_id->post_id; 411 $rel_post = get_posts('p='.$rel_post_id) ; 412 if($rel_post) { 413 414 array_push($res, $value_id ); 415 break; 416 } 417 } 418 393 419 if(isset($res[0]->post_id)) 394 420 {
Note: See TracChangeset
for help on using the changeset viewer.