Simple 301 Redirects - Version 1.03

Version Description

  • Sorry for the double update. I forgot to check for PHP4 compatibility. Many people are still using PHP4, apparently, so this update is to fix compatibility with these legacy systems.
Download this release

Release Info

Developer scottnelle
Plugin Icon 128x128 Simple 301 Redirects
Version 1.03
Comparing to
See all releases

Code changes from version 1.02 to 1.03

Files changed (2) hide show
  1. readme.txt +5 -1
  2. wp-simple-301-redirects.php +15 -1
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: scottnelle
3
  Tags: 301, redirect, url, seo
4
  Requires at least: 1.5
5
  Tested up to: 3.0
6
- Stable tag: 1.02
7
 
8
  Simple 301 Redirects provides an easy method of redirecting requests to another page on your site or elsewhere on the web.
9
 
@@ -25,6 +25,10 @@ Note: The format for requests is '/about.htm' and the format for redirects is 'h
25
 
26
  == Changelog ==
27
 
 
 
 
 
28
  = 1.02 =
29
  * Added support for special characters in non-english URLs.
30
  * Fixed a case sensitivity bug.
3
  Tags: 301, redirect, url, seo
4
  Requires at least: 1.5
5
  Tested up to: 3.0
6
+ Stable tag: 1.03
7
 
8
  Simple 301 Redirects provides an easy method of redirecting requests to another page on your site or elsewhere on the web.
9
 
25
 
26
  == Changelog ==
27
 
28
+ = 1.03 =
29
+ * Sorry for the double update. I forgot to check for PHP4 compatibility. Many people are still using PHP4, apparently, so this update is to fix compatibility with these legacy systems.
30
+
31
+
32
  = 1.02 =
33
  * Added support for special characters in non-english URLs.
34
  * Fixed a case sensitivity bug.
wp-simple-301-redirects.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Simple 301 Redirects
4
  Plugin URI: http://www.scottnelle.com/simple-301-redirects-plugin-for-wordpress/
5
  Description: Create a list of URLs that you would like to 301 redirect to another page or site
6
- Version: 1.02
7
  Author: Scott Nellé
8
  Author URI: http://www.scottnelle.com/
9
  */
@@ -165,4 +165,18 @@ if (isset($redirect_plugin)) {
165
  }
166
  }
167
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
168
  ?>
3
  Plugin Name: Simple 301 Redirects
4
  Plugin URI: http://www.scottnelle.com/simple-301-redirects-plugin-for-wordpress/
5
  Description: Create a list of URLs that you would like to 301 redirect to another page or site
6
+ Version: 1.03
7
  Author: Scott Nellé
8
  Author URI: http://www.scottnelle.com/
9
  */
165
  }
166
  }
167
 
168
+ // this is here for php4 compatibility
169
+ if(!function_exists('str_ireplace')){
170
+ function str_ireplace($search,$replace,$subject){
171
+ $token = chr(1);
172
+ $haystack = strtolower($subject);
173
+ $needle = strtolower($search);
174
+ while (($pos=strpos($haystack,$needle))!==FALSE){
175
+ $subject = substr_replace($subject,$token,$pos,strlen($search));
176
+ $haystack = substr_replace($haystack,$token,$pos,strlen($search));
177
+ }
178
+ $subject = str_replace($token,$replace,$subject);
179
+ return $subject;
180
+ }
181
+ }
182
  ?>