Changeset 469873
- Timestamp:
- 12/01/2011 02:15:33 PM (14 years ago)
- Location:
- seo-blogger-to-wordpress-301-redirector/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (2 diffs)
-
seo-blogger-to-wordpress.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
seo-blogger-to-wordpress-301-redirector/trunk/readme.txt
r443101 r469873 5 5 Requires at least: 2.6 6 6 Tested up to: 3.2.1 7 Stable tag: 0.3. 27 Stable tag: 0.3.3 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. … … 68 68 == Upgrade Notice == 69 69 70 = 0.3. 2=71 Added the much awaited feature that'll add all the images to your media library 70 = 0.3.3 = 71 Bug Fixes -
seo-blogger-to-wordpress-301-redirector/trunk/seo-blogger-to-wordpress.php
r443101 r469873 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.3. 26 Version: 0.3.3 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 if (@GetImageSize($replace[0])) {204 203 $upload = media_sideload_image(trim($replace[0]), $post->ID); 205 204 … … 213 212 $count++; 214 213 215 } 214 216 215 } 217 216 … … 228 227 $filename = trim(str_replace('%', '', end($final))); 229 228 $ext = substr(trim($replace[0]), -4); 230 if ($ext == ".JPG" || $ext == ".jpg" || $ext == ".PNG" || $ext == ".png" || $ext == ".GIF" || $ext == ".gif" )229 if ($ext == ".JPG" || $ext == ".jpg" || $ext == ".PNG" || $ext == ".png" || $ext == ".GIF" || $ext == ".gif" || $ext == ".jpeg") 231 230 { 232 231 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]))) 233 232 { 234 if (@GetImageSize($replace[0])) {235 233 $upload = media_sideload_image(trim($replace[0]), $post->ID); 236 234 … … 244 242 $count++; 245 243 246 } 244 247 245 248 246 } … … 355 353 if ( !is_404() ) 356 354 return; 357 358 $req_uri = $_SERVER['REQUEST_URI'];355 $subdirectory = explode ("/", get_home_url()); 356 $req_uri = str_replace("/".end($subdirectory), "", $_SERVER['REQUEST_URI']); 359 357 $url = explode("?", $req_uri); 360 358 $res = $wpdb->get_results("SELECT post_id FROM $wpdb->postmeta WHERE meta_key = 'blogger_permalink' AND meta_value = '$url[0]'");
Note: See TracChangeset
for help on using the changeset viewer.