404 to 301 - Version 2.2.1

Version Description

(01/06/2016) = New Feature

  • Now you can set custom redirects for reach error path.
  • Goto error logs list and set custom redirect.

Improvements

  • Improved code.
Download this release

Release Info

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

Code changes from version 2.2.0 to 2.2.1

404-to-301.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: 404 to 301
4
  * Plugin URI: https://thefoxe.com/products/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.2.0
7
  * Author: Joel James
8
  * Author URI: https://thefoxe.com/
9
  * Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=XUVWY8HUBUXY4
@@ -48,8 +48,8 @@ if ( ! class_exists( '_404_To_301' ) ) {
48
  'I4T3_SETTINGS_PAGE' => admin_url( 'admin.php?page=i4t3-settings' ),
49
  'I4T3_HELP_PAGE' => admin_url( 'admin.php?page=i4t3-settings&tab=credits' ),
50
  'I4T3_LOGS_PAGE' => admin_url( 'admin.php?page=i4t3-logs' ),
51
- 'I4T3_DB_VERSION' => '4',
52
- 'I4T3_VERSION' => '2.2.0',
53
  'I4T3_TABLE' => $GLOBALS['wpdb']->prefix . '404_to_301',
54
  // Set who all can access 404 settings.
55
  // You can change this if you want to give others access.
@@ -58,8 +58,8 @@ if ( ! class_exists( '_404_To_301' ) ) {
58
 
59
  foreach ($constants as $constant => $value) {
60
  // Define constants if not defined already
61
- if (!defined($constant)) {
62
- define($constant, $value);
63
  }
64
  }
65
 
3
  * Plugin Name: 404 to 301
4
  * Plugin URI: https://thefoxe.com/products/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.2.1
7
  * Author: Joel James
8
  * Author URI: https://thefoxe.com/
9
  * Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=XUVWY8HUBUXY4
48
  'I4T3_SETTINGS_PAGE' => admin_url( 'admin.php?page=i4t3-settings' ),
49
  'I4T3_HELP_PAGE' => admin_url( 'admin.php?page=i4t3-settings&tab=credits' ),
50
  'I4T3_LOGS_PAGE' => admin_url( 'admin.php?page=i4t3-logs' ),
51
+ 'I4T3_DB_VERSION' => '5',
52
+ 'I4T3_VERSION' => '2.2.1',
53
  'I4T3_TABLE' => $GLOBALS['wpdb']->prefix . '404_to_301',
54
  // Set who all can access 404 settings.
55
  // You can change this if you want to give others access.
58
 
59
  foreach ($constants as $constant => $value) {
60
  // Define constants if not defined already
61
+ if ( ! defined( $constant ) ) {
62
+ define( $constant, $value );
63
  }
64
  }
65
 
admin/images/buy-now-dcl.png DELETED
Binary file
admin/images/coder.png DELETED
Binary file
admin/images/debug.png DELETED
Binary file
admin/images/foxe.png ADDED
Binary file
admin/images/js-icon.png DELETED
Binary file
admin/images/logo.png DELETED
Binary file
admin/partials/404-to-301-admin-agreement-tab.php ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="notice i4t3-notice">
2
+ <span>
3
+ <div class="i4t3-fixed-height">
4
+ <p>We would like to warn our users about other <em>not so legit</em> clones of 404 to 301 being sold out there. Keyword Swarm, for example, is a repackaged version of 404 to 301 plus all our premium add-ons(if any). We never authorized the author to resell our add-ons, and our license explicitly forbids it. 404 to 301 is free, and people should not pay for an unsupported fraudulent piece of software. In order to protect our intellectual property rights, we are asking you to review the following terms of use.</p>
5
+ <p><strong>GNU General Public License v2</strong></p>
6
+ <ol>
7
+ <li>You may copy and distribute verbatim copies of 404 to 301's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of 404 to 301 a copy of this License along with 404 to 301. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.</li>
8
+ <li>You may modify your copy or copies of 404 to 301 or any portion of it, thus forming a work based on 404 to 301, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
9
+ <ol>
10
+ <li>You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.</li>
11
+ <li>You must cause any work that you distribute or publish, <strong>that in whole or in part contains or is derived from 404 to 301 or any part thereof, to be licensed as a whole at no charge</strong> to all third parties under the terms of this License.</li>
12
+ <li>If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute 404 to 301 under these conditions, and telling the user how to view a copy of this License.</li>
13
+ </ol>
14
+ These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from 404 to 301, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on 404 to 301, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
15
+ Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on 404 to 301.
16
+ In addition, mere aggregation of another work not based on 404 to 301 with 404 to 301 (or with a work based on 404 to 301) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
17
+ </li>
18
+ <li>You may copy and distribute 404 to 301 (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:
19
+ <ol>
20
+ <li>Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,</li>
21
+ <li>Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,</li>
22
+ <li>Accompany it with the information you received as to the offer to distribute corresponding source code.</li>
23
+ </ol>
24
+ The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
25
+ If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.</li>
26
+ <li>You may not copy, modify, sublicense, or distribute 404 to 301 except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute 404 to 301 is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.</li>
27
+ <li>You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute 404 to 301 or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing 404 to 301 (or any work based on 404 to 301), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying 404 to 301 or works based on it.</li>
28
+ <li>Each time you redistribute 404 to 301 (or any work based on 404 to 301), the recipient automatically receives a license from the original licensor to copy, distribute or modify 404 to 301 subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.</li>
29
+ <li>If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, <strong>then as a consequence you may not distribute 404 to 301 at all</strong>. For example, if a patent license would not permit royalty-free redistribution of 404 to 301 by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of 404 to 301.
30
+ If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.
31
+ It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
32
+ This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.</li>
33
+ <li>If the distribution and/or use of 404 to 301 is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places 404 to 301 under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.</li>
34
+ <li>The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
35
+ Each version is given a distinguishing version number.</li>
36
+ <li>If you wish to incorporate parts of 404 to 301 into other free programs whose distribution conditions are different, <strong>write to the author to ask for permission</strong>. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.</li>
37
+ <li><strong>NO WARRANTY</strong> - BECAUSE 404 to 301 IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR 404 to 301, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE 404 to 301 "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF 404 to 301 IS WITH YOU. SHOULD 404 to 301 PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.</li>
38
+ <li>IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE 404 to 301 AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE 404 to 301 (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF 404 to 301 TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</li>
39
+ </ol>
40
+
41
+ <p><strong>Third Party Text Links</strong></p>
42
+ <p>Third party text networks supply text for display in 404 to 301. These networks may collect your visitors' IP addresses, in native or hashed forms, for purposes of controlling the distribution of text links. 404 to 301 collects anonymous aggregated usage statistics.</p>
43
+ <p>By clicking the button here below, you agree to the terms and conditions and give permission to place text links on your website when search engine crawlers access it. Your website's layout, performance and interaction with human visitors should not be altered or affected in any way. Please note that this feature can be deactivated at any time under <strong>404 to 301 Setting > Help & Info > Plugin Information > Disable UAN</strong>, without affecting any other feature available in 404 to 301.</p>
44
+ <p>404 to 301 - Copyright &copy; 2016.</p>
45
+ </div>
46
+
47
+ <div>
48
+ <a class="button-primary" href="<?php echo I4T3_SETTINGS_PAGE; ?>&i4t3_agreement=1" id="i4t3-accept-terms">I accept</a>
49
+ <a class="button-secondary" href="<?php echo I4T3_SETTINGS_PAGE; ?>&i4t3_agreement=0" id="i4t3-hide-admin-notice">I do not accept</a>
50
+ </div>
51
+ </span>
52
+ </div>
admin/partials/404-to-301-admin-custom-redirect.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div id="i4t3-redirect-modal" style="display:none;">
2
+ <div id="i4t3-thickbox-content" class="wrap">
3
+ <form id="i4t3_custom_redirect_form" action="javascript:void(0)">
4
+ <table class="form-table">
5
+ <tr>
6
+ <th><?php _e('Redirecting from', '404-to-301'); ?> :</th>
7
+ <td><strong><p id="i4t3_redirect_404_text">/404-not-found</p></strong></td>
8
+ </tr>
9
+ <tr>
10
+ <th><?php _e('Redirect to', '404-to-301'); ?> :</th>
11
+ <td>
12
+ <input type="text" size="40" name="i4t3_custom_redirect" id="i4t3_redirect_url" value="">
13
+ <p class="description"><?php _e('Enter the url if you want to set custom redirect for above 404 path. Enter the full url including http://. Leave empty if you want to follow deafult settings', '404-to-301'); ?>.</p>
14
+ <input type="hidden" value="" id="i4t3_redirect_404">
15
+ <input type="hidden" value="<?php echo wp_create_nonce( "i4t3_custom_redirect_nonce" ); ?>" id="i4t3_custom_redirect_nonce">
16
+ </td>
17
+ </tr>
18
+ <tr>
19
+ <td><span class="spinner i4t3-spinner"></span></td>
20
+ <td>
21
+ <?php
22
+ submit_button(
23
+ __('Save Redirect', '404-to-301'),
24
+ 'primary',
25
+ 'i4t3_custom_redirect_submit',
26
+ false,
27
+ array(
28
+ 'id' => 'i4t3_custom_redirect_submit'
29
+ )
30
+ );
31
+ ?>
32
+ </td>
33
+ </tr>
34
+ </table>
35
+ </form>
36
+ </div>
37
+ </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.5
6
  Tested up to: 4.5.2
7
- Stable tag: 2.2.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -128,7 +128,7 @@ Bug reports for 404 to 301 are always welcome. [Report here](https://thefoxe.com
128
 
129
  == Changelog ==
130
 
131
- = 2.2.0 (09/05/2016) =
132
  **New Feature**
133
 
134
  - Now you can set **custom redirects** for reach error path.
@@ -291,7 +291,7 @@ Bug reports for 404 to 301 are always welcome. [Report here](https://thefoxe.com
291
 
292
  == Upgrade Notice ==
293
 
294
- = 2.2.0 (09/05/2016) =
295
  **New Feature**
296
 
297
  - Now you can set **custom redirects** for reach error path.
4
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=XUVWY8HUBUXY4
5
  Requires at least: 3.5
6
  Tested up to: 4.5.2
7
+ Stable tag: 2.2.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
128
 
129
  == Changelog ==
130
 
131
+ = 2.2.1 (01/06/2016) =
132
  **New Feature**
133
 
134
  - Now you can set **custom redirects** for reach error path.
291
 
292
  == Upgrade Notice ==
293
 
294
+ = 2.2.1 (01/06/2016) =
295
  **New Feature**
296
 
297
  - Now you can set **custom redirects** for reach error path.
screenshot-3.png ADDED
Binary file