404 to 301 - Version 2.0.1

Version Description

(29/07/2015) = New Feature

  • Now you can log/monitor all 404 errors (optional).
  • You can get email notifications on 404 errors (optional).
  • You can select existing pages from dropdown to set as redirect page.
  • New plugin home page.

Improvements

  • Upgraded to WordPress plugin coding standard.
  • Documented all functions.
Download this release

Release Info

Developer joelcj91
Plugin Icon 128x128 404 to 301
Version 2.0.1
Comparing to
See all releases

Code changes from version 2.0.0 to 2.0.1

404-to-301.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: 404 to 301
4
  * Plugin URI: http://iscode.co/product/404-to-301/
5
  * Description: Automatically redirect all <strong>404 errors</strong> to any page using <strong>301 redirect for SEO</strong>. You can <strong>redirect and log</strong> every 404 errors. No more 404 errors in Webmaster tool.
6
- * Version: 2.0.0
7
  * Author: Joel James
8
  * Author URI: http://iscode.co/
9
  * Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=XUVWY8HUBUXY4
3
  * Plugin Name: 404 to 301
4
  * Plugin URI: http://iscode.co/product/404-to-301/
5
  * Description: Automatically redirect all <strong>404 errors</strong> to any page using <strong>301 redirect for SEO</strong>. You can <strong>redirect and log</strong> every 404 errors. No more 404 errors in Webmaster tool.
6
+ * Version: 2.0.1
7
  * Author: Joel James
8
  * Author URI: http://iscode.co/
9
  * Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=XUVWY8HUBUXY4
includes/class-404-to-301.php CHANGED
@@ -67,7 +67,7 @@ class _404_To_301 {
67
  public function __construct() {
68
 
69
  $this->plugin_name = '404-to-301';
70
- $this->version = '2.0.0';
71
  $this->table = $GLOBALS['wpdb']->prefix . '404_to_301';
72
  $this->load_dependencies();
73
  $this->define_admin_hooks();
67
  public function __construct() {
68
 
69
  $this->plugin_name = '404-to-301';
70
+ $this->version = '2.0.1';
71
  $this->table = $GLOBALS['wpdb']->prefix . '404_to_301';
72
  $this->load_dependencies();
73
  $this->define_admin_hooks();
js-404-admin.php DELETED
@@ -1,54 +0,0 @@
1
- <?php
2
- /*
3
- * Admin setting form
4
- * Using post values
5
- */
6
- if (!current_user_can('manage_options')) {
7
- wp_die( __('You do not have sufficient permissions to access this page.') );
8
- }
9
- if(isset($_POST['js_hidden']) && $_POST['js_hidden'] == 'Y') {
10
- $type = $_POST['type'];
11
- update_option('type', $type);
12
-
13
- $link = $_POST['link'];
14
- update_option('link', $link);
15
-
16
- ?>
17
- <div class="updated"><p><strong><?php _e('Options saved.' ); ?></strong></p></div>
18
- <?php
19
- } else {
20
- $type = get_option('type');
21
- $link = get_option('link');
22
- }
23
- ?>
24
- <div class="wrap">
25
- <table width="100%">
26
- <tr><td width="70%">
27
- <?php echo "<h3>" . __( '404 to 301', 'oscimp_trdom' ) . " <a href='http://www.joelsays.com/plugins/404-to-301/' target='_blank'>Plugin Website</a></h3>"; ?>
28
- <hr/>
29
- <form name="oscimp_form" method="post" action="<?php echo str_replace( '%7E', '~', $_SERVER['REQUEST_URI']); ?>">
30
- <input type="hidden" name="js_hidden" value="Y">
31
- <?php echo "<h4>" . __( 'Redirect Type Settings', 'oscimp_trdom' ) . "</h4>"; ?>
32
- <p><?php _e("Type of redirect : " ); ?><select name='type' id='type'>
33
- <option value='301' <?php if($type=='301'){echo 'selected';}?>>301 Permanent</option>
34
- <option value='302' <?php if($type=='302'){echo 'selected';}?>>302 Temporary</option>
35
- <option value='307' <?php if($type=='307'){echo 'selected';}?>>307 Temporary</option>
36
- </select></p>
37
- <hr />
38
- <?php echo "<h4>" . __( 'Redirect Page Settings', 'oscimp_trdom' ) . "</h4>"; ?>
39
- <p><?php _e("Redirect to : " ); ?><input type="text" id="link" name="link" placeholder="http://example.com" value="<?php echo $link; ?>">
40
- <p>Please make sure to add http:// to the url
41
- <p class="submit">
42
- <input type="submit" name="Submit" id="submit" class="button button-primary" value="<?php _e('Update Options', 'oscimp_trdom' ) ?>" />
43
- </p>
44
- </form>
45
- </td><td width="30%">
46
- <div align="center"><a style="href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=XUVWY8HUBUXY4" target="_blank"><img src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif"></a></div><br/>
47
- <h4>If you think my plugin is useful, please consider a small donation.</h4>
48
- <h3>Feel free to use <a href="http://www.joelsays.com/members-area/support/plugin-support-404-to-301/" target="_blank">Support Forum </a>if you have any doubts or feedback</h4>
49
- <h4>Please <a href="https://wordpress.org/support/view/plugin-reviews/404-to-301?filter=5#postform" target="_blank">add a review/rating</a> for this plugin @WordPress</h4></td>
50
- </tr></table></div>
51
- <br/><br><hr/>
52
- <div>
53
- <h4>Main advantage of this plugin is that 404 errors in your website will not be considered as error pages.<br/>Automatically creates a 301 permanent redirect if a 404 link found to your website.</h4><br/><h3>Check <a href='https://support.google.com/webmasters/answer/93633?hl=en' target='_blank'>Official Google Page</a> to know more about 301 redirect</h3>
54
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: 404, 301, 302, 307, not found, 404 redirect, 404 to 301, 301 redirect, seo
4
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=XUVWY8HUBUXY4
5
  Requires at least: 3.0
6
  Tested up to: 4.2.4
7
- Stable tag: 2.0.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -110,7 +110,7 @@ Bug reports for 404 to 301 are always welcome. [Report here](https://iscode.co/s
110
 
111
  == Changelog ==
112
 
113
- = 2.0.0 (29/07/2015) =
114
  **New Feature**
115
 
116
  - Now you can log/monitor all 404 errors (optional).
@@ -154,6 +154,5 @@ Bug reports for 404 to 301 are always welcome. [Report here](https://iscode.co/s
154
 
155
  == Upgrade Notice ==
156
 
157
- = 1.0.8 =
158
- * Very minor bug fix
159
- * Tested for WP 4.2
4
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=XUVWY8HUBUXY4
5
  Requires at least: 3.0
6
  Tested up to: 4.2.4
7
+ Stable tag: 2.0.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
110
 
111
  == Changelog ==
112
 
113
+ = 2.0.1 (29/07/2015) =
114
  **New Feature**
115
 
116
  - Now you can log/monitor all 404 errors (optional).
154
 
155
  == Upgrade Notice ==
156
 
157
+ = 2.0.1 =
158
+ * Upgraded the plugin core code.