WP 404 Auto Redirect to Similar Post - Version 1.0.1

Version Description

  • Fix: Priority exception when it equals 0
  • Fix: Settings page link missing from plugins page
Download this release

Release Info

Developer hwk-fr
Plugin Icon 128x128 WP 404 Auto Redirect to Similar Post
Version 1.0.1
Comparing to
See all releases

Code changes from version 1.0 to 1.0.1

includes/admin.php CHANGED
@@ -13,7 +13,7 @@ trait WP_404_Auto_Redirect_Admin {
13
  }
14
 
15
  function admin_link($links, $plugin_file){
16
- $plugin = plugin_basename(__FILE__);
17
  if($plugin != $plugin_file)
18
  return $links;
19
 
@@ -31,8 +31,8 @@ trait WP_404_Auto_Redirect_Admin {
31
  if($page != 'settings_page_wp-404-auto-redirect')
32
  return;
33
 
34
- wp_enqueue_script('wp404arsp_admin_js', plugins_url('../assets/admin.js', __FILE__), array('jquery'));
35
- wp_enqueue_style('wp404arsp_admin_css', plugins_url('../assets/admin.css', __FILE__));
36
  }
37
 
38
  function admin_page(){
@@ -545,9 +545,9 @@ trait WP_404_Auto_Redirect_Admin {
545
  <div class="postbox">
546
 
547
  <div class="inside">
548
- <img src="<?php echo plugins_url('../assets/logo.png', __FILE__); ?>" class="logo" />
549
 
550
- <p><?php _e('Automatically redirect all your 404 pages to similar posts based on Title, Post Types & Taxonomies.', 'wp404-auto-redirect'); ?></p>
551
 
552
  <h3><?php _e('Rate us', 'wp404-auto-redirect'); ?></h3>
553
 
13
  }
14
 
15
  function admin_link($links, $plugin_file){
16
+ $plugin = plugin_basename(WP404ARSP_FILE);
17
  if($plugin != $plugin_file)
18
  return $links;
19
 
31
  if($page != 'settings_page_wp-404-auto-redirect')
32
  return;
33
 
34
+ wp_enqueue_script('wp404arsp_admin_js', plugins_url('assets/admin.js', WP404ARSP_FILE), array('jquery'));
35
+ wp_enqueue_style('wp404arsp_admin_css', plugins_url('assets/admin.css', WP404ARSP_FILE));
36
  }
37
 
38
  function admin_page(){
545
  <div class="postbox">
546
 
547
  <div class="inside">
548
+ <img src="<?php echo plugins_url('assets/logo.png', WP404ARSP_FILE); ?>" class="logo" />
549
 
550
+ <p><?php _e('Automatically redirect 404 pages to similar posts based on Title, Post Types & Taxonomies.', 'wp404-auto-redirect'); ?></p>
551
 
552
  <h3><?php _e('Rate us', 'wp404-auto-redirect'); ?></h3>
553
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://hwk.fr/
4
  Tags: SEO, 404, Redirect, 301, Similar, Related, Search, Broken Link, Webmaster Tools, Google
5
  Requires at least: 4.0
6
  Tested up to: 4.9.8
7
- Stable tag: 1.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -14,7 +14,7 @@ Automatically Redirect any 404 page to a Similar Post based on the Title Post Ty
14
 
15
  Welcome to WP 404 Auto Redirect to Similar Post!
16
 
17
- This plugin automatically redirect any 404 page to similar posts based on Title, Post Types & Taxonomies. If nothing similar is found, redirect visitors to the homepage or a custom URL.
18
 
19
  = Features: =
20
 
@@ -54,7 +54,7 @@ Default Group Engines:
54
  Find and fix common URL mistakes.
55
 
56
  2. Direct Match
57
- Search for a Post matching perfectly keywords.
58
 
59
  4. Search Post
60
  Search for a similar Post.
@@ -375,6 +375,10 @@ function my_404_after_redirect($query){
375
 
376
  == Changelog ==
377
 
 
 
 
 
378
  = 1.0 =
379
  * Added: Log redirections in the /wp-content/debug.log file.
380
  * Added: Expose 'WP-404-Auto-Redirect' headers on 404 pages. (Admin).
4
  Tags: SEO, 404, Redirect, 301, Similar, Related, Search, Broken Link, Webmaster Tools, Google
5
  Requires at least: 4.0
6
  Tested up to: 4.9.8
7
+ Stable tag: 1.0.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
14
 
15
  Welcome to WP 404 Auto Redirect to Similar Post!
16
 
17
+ This plugin automatically redirect 404 pages to similar posts based on Title, Post Types & Taxonomies. If nothing similar is found, visitors will be redirected to the homepage or a custom URL.
18
 
19
  = Features: =
20
 
54
  Find and fix common URL mistakes.
55
 
56
  2. Direct Match
57
+ Search for a Post that perfectly match keywords.
58
 
59
  4. Search Post
60
  Search for a similar Post.
375
 
376
  == Changelog ==
377
 
378
+ = 1.0.1 =
379
+ * Fix: Priority exception when it equals 0
380
+ * Fix: Settings page link missing from plugins page
381
+
382
  = 1.0 =
383
  * Added: Log redirections in the /wp-content/debug.log file.
384
  * Added: Expose 'WP-404-Auto-Redirect' headers on 404 pages. (Admin).
wp-404-auto-redirect-similar-post.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: WP 404 Auto Redirect to Similar Post
4
  * Description: Automatically Redirect any 404 page to a Similar Post based on the Title, Post Type & Taxonomy using 301 Redirects!
5
  * Author: hwk-fr
6
- * Version: 1.0
7
  * Author URI: http://hwk.fr
8
  */
9
 
@@ -81,8 +81,8 @@ class WP_404_Auto_Redirect {
81
 
82
  $priority = 999;
83
  $wp404arsp_settings = get_option('wp404arsp_settings');
84
- if(isset($wp404arsp_settings['priority']) && (!empty($wp404arsp_settings['priority']) || $wp404arsp_settings['priority'] === 0))
85
- $priority = $wp404arsp_settings['priority'];
86
 
87
  return $priority;
88
 
3
  * Plugin Name: WP 404 Auto Redirect to Similar Post
4
  * Description: Automatically Redirect any 404 page to a Similar Post based on the Title, Post Type & Taxonomy using 301 Redirects!
5
  * Author: hwk-fr
6
+ * Version: 1.0.1
7
  * Author URI: http://hwk.fr
8
  */
9
 
81
 
82
  $priority = 999;
83
  $wp404arsp_settings = get_option('wp404arsp_settings');
84
+ if(isset($wp404arsp_settings['priority']))
85
+ $priority = (int) $wp404arsp_settings['priority'];
86
 
87
  return $priority;
88