Version Description
- 2021/02/22
- added 404 error log Dashboard widget
- fixed some bugs
- added support for Cache Enabler plugin
Download this release
Release Info
Developer | WebFactory |
Plugin | Eggplant 301 Redirects |
Version | 2.65 |
Comparing to | |
See all releases |
Code changes from version 2.60 to 2.65
- eps-301-redirects.php +56 -3
- libs/eps-plugin-options.php +3 -3
- plugin.php +2 -1
- readme.txt +15 -4
eps-301-redirects.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: 301 Redirects
|
4 |
-
Description: Easily create and manage redirect rules.
|
5 |
-
Version: 2.
|
6 |
Author: WebFactory Ltd
|
7 |
Author URI: https://www.webfactoryltd.com/
|
8 |
Plugin URI: https://wp301redirects.com/
|
@@ -36,7 +36,7 @@ if (!defined('WF301_PLUGIN_FILE')) {
|
|
36 |
|
37 |
define('EPS_REDIRECT_PATH', plugin_dir_path(__FILE__));
|
38 |
define('EPS_REDIRECT_URL', plugins_url() . '/eps-301-redirects/');
|
39 |
-
define('EPS_REDIRECT_VERSION', '2.
|
40 |
define('EPS_REDIRECT_PRO', false);
|
41 |
|
42 |
include(EPS_REDIRECT_PATH . 'eps-form-elements.php');
|
@@ -78,6 +78,7 @@ if (!defined('WF301_PLUGIN_FILE')) {
|
|
78 |
add_action('wp_ajax_eps_dismiss_pointer', array($this, 'dismiss_pointer_ajax'));
|
79 |
add_filter('plugin_action_links_' . plugin_basename(__FILE__), array($this, 'plugin_action_links'));
|
80 |
add_filter('admin_footer_text', array($this, 'admin_footer_text'));
|
|
|
81 |
} else {
|
82 |
if (defined('WP_CLI') && WP_CLI) {
|
83 |
} else {
|
@@ -114,6 +115,58 @@ if (!defined('WF301_PLUGIN_FILE')) {
|
|
114 |
wp_send_json_success();
|
115 |
} // dismiss_pointer_ajax
|
116 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
117 |
/**
|
118 |
*
|
119 |
* DO_REDIRECT
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: 301 Redirects
|
4 |
+
Description: Easily create and manage redirect rules, and view 404 error log.
|
5 |
+
Version: 2.65
|
6 |
Author: WebFactory Ltd
|
7 |
Author URI: https://www.webfactoryltd.com/
|
8 |
Plugin URI: https://wp301redirects.com/
|
36 |
|
37 |
define('EPS_REDIRECT_PATH', plugin_dir_path(__FILE__));
|
38 |
define('EPS_REDIRECT_URL', plugins_url() . '/eps-301-redirects/');
|
39 |
+
define('EPS_REDIRECT_VERSION', '2.65');
|
40 |
define('EPS_REDIRECT_PRO', false);
|
41 |
|
42 |
include(EPS_REDIRECT_PATH . 'eps-form-elements.php');
|
78 |
add_action('wp_ajax_eps_dismiss_pointer', array($this, 'dismiss_pointer_ajax'));
|
79 |
add_filter('plugin_action_links_' . plugin_basename(__FILE__), array($this, 'plugin_action_links'));
|
80 |
add_filter('admin_footer_text', array($this, 'admin_footer_text'));
|
81 |
+
add_action('wp_dashboard_setup', array($this, 'add_widget'));
|
82 |
} else {
|
83 |
if (defined('WP_CLI') && WP_CLI) {
|
84 |
} else {
|
115 |
wp_send_json_success();
|
116 |
} // dismiss_pointer_ajax
|
117 |
|
118 |
+
// add widget to dashboard
|
119 |
+
function add_widget() {
|
120 |
+
add_meta_box('wp301_404_errors', '404 Error Log', array($this, 'widget_content'), 'dashboard', 'side', 'high');
|
121 |
+
} // add_widget
|
122 |
+
|
123 |
+
|
124 |
+
// render widget
|
125 |
+
function widget_content() {
|
126 |
+
require EPS_REDIRECT_PATH . '/libs/UserAgentParser.php';
|
127 |
+
|
128 |
+
$log = get_option('eps_redirects_404_log', array());
|
129 |
+
if (!sizeof($log)) {
|
130 |
+
echo '<p>You currently don\'t have any data in the 404 error log. That means that you either just installed the plugin, or that you never had a 404 error happen which is <b>awesome 🚀</b>!</p>';
|
131 |
+
echo '<p>Don\'t like seeing an empty error log? Or just want to see see if the log works? Open any <a target="_blank" title="Open an nonexistent URL to see if the 404 error log works" href="' . home_url('/nonexistent/url/') . '">nonexistent URL</a> and then reload this page.</p>';
|
132 |
+
} else {
|
133 |
+
echo '<style>#wp301_404_errors .inside { padding: 0; margin: 0; }';
|
134 |
+
echo '#wp301_404_errors table td { max-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }';
|
135 |
+
echo '#wp301_404_errors table th { font-weight: 500; }';
|
136 |
+
echo '#wp301_404_errors table { border-left: none; border-right: none; border-top: none; }';
|
137 |
+
echo '#wp301_404_errors p { padding: 0 12px 12px 12px; }';
|
138 |
+
echo '#wp301_404_errors .dashicons { opacity: 0.75; font-size: 17px; line-height: 17px; width: 17px; height: 17px;vertical-align: bottom; }</style>';
|
139 |
+
echo '<table class="striped widefat">';
|
140 |
+
echo '<tr>';
|
141 |
+
echo '<th>Date &<br>Time <span class="dashicons dashicons-arrow-down"></span></th>';
|
142 |
+
echo '<th>Target URL</th>';
|
143 |
+
echo '<th>User Device</th>';
|
144 |
+
echo '</tr>';
|
145 |
+
|
146 |
+
$i = 1;
|
147 |
+
foreach ($log as $l) {
|
148 |
+
$ua = \epsdonatj\UserAgent\parse_user_agent($l['user_agent']);
|
149 |
+
$agent = trim(@$ua['platform'] . ' ' . @$ua['browser']);
|
150 |
+
if (empty($agent)) {
|
151 |
+
$agent = '<i>unknown</i>';
|
152 |
+
}
|
153 |
+
echo '<tr>';
|
154 |
+
echo '<td nowrap><abbr title="' . date(get_option('date_format'), $l['timestamp']) . ' @ ' . date(get_option('time_format'), $l['timestamp']) . '">' . human_time_diff(current_time('timestamp'), $l['timestamp']) . ' ago</abbr></td>';
|
155 |
+
echo '<td><a title="Open target URL in a new tab" target="_blank" href="' . $l['url'] . '">' . $l['url'] . '</a> <span class="dashicons dashicons-external"></span></td>';
|
156 |
+
echo '<td>' . $agent . '</td>';
|
157 |
+
echo '</tr>';
|
158 |
+
$i++;
|
159 |
+
if ($i >= 10) {
|
160 |
+
break;
|
161 |
+
}
|
162 |
+
} // foreach
|
163 |
+
echo '</table>';
|
164 |
+
|
165 |
+
echo '<p>View the entire <a href="' . admin_url('options-general.php?page=eps_redirects&tab=404s') . '">404 error log</a> in the 301 Redirects plugin or <a href="' . admin_url('options-general.php?page=eps_redirects') . '">create new redirect rules</a> to fix 404 errors.</p>';
|
166 |
+
}
|
167 |
+
} // widget_content
|
168 |
+
|
169 |
+
|
170 |
/**
|
171 |
*
|
172 |
* DO_REDIRECT
|
libs/eps-plugin-options.php
CHANGED
@@ -403,9 +403,9 @@ function pro_dialog() {
|
|
403 |
$out .= '</tr>';
|
404 |
|
405 |
$out .= '<tr>';
|
406 |
-
$out .= '<td><span class="dashicons dashicons-yes"></span><b>1 Site License</b
|
407 |
-
$out .= '<td><span class="dashicons dashicons-yes"></span><b>5 Sites License</b
|
408 |
-
$out .= '<td><span class="dashicons dashicons-yes"></span><b>100 Sites License</b
|
409 |
$out .= '</tr>';
|
410 |
|
411 |
$out .= '<tr>';
|
403 |
$out .= '</tr>';
|
404 |
|
405 |
$out .= '<tr>';
|
406 |
+
$out .= '<td><span class="dashicons dashicons-yes"></span><b>1 Site License</b> ($49 per site)</td>';
|
407 |
+
$out .= '<td><span class="dashicons dashicons-yes"></span><b>5 Sites License</b> ($12 per site)</td>';
|
408 |
+
$out .= '<td><span class="dashicons dashicons-yes"></span><b>100 Sites License</b> ($1 per site)</td>';
|
409 |
$out .= '</tr>';
|
410 |
|
411 |
$out .= '<tr>';
|
plugin.php
CHANGED
@@ -333,7 +333,7 @@ class EPS_Redirects_Plugin
|
|
333 |
static function reset_pointers() {
|
334 |
$pointers = array();
|
335 |
|
336 |
-
$pointers['welcome'] = array('target' => '#menu-settings', 'edge' => 'left', 'align' => 'right', 'content' => 'Thank you for installing the <b style="font-weight: 800;">301 Redirects plugin</b>! Please open <a href="' . admin_url('options-general.php?page=eps_redirects'). '">Settings - 301 Redirects</a> to manage
|
337 |
|
338 |
update_option('eps_pointers', $pointers);
|
339 |
} // reset_pointers
|
@@ -416,6 +416,7 @@ class EPS_Redirects_Plugin
|
|
416 |
if (function_exists('rocket_clean_domain')) {
|
417 |
rocket_clean_domain();
|
418 |
}
|
|
|
419 |
} // empty_cache
|
420 |
|
421 |
|
333 |
static function reset_pointers() {
|
334 |
$pointers = array();
|
335 |
|
336 |
+
$pointers['welcome'] = array('target' => '#menu-settings', 'edge' => 'left', 'align' => 'right', 'content' => 'Thank you for installing the <b style="font-weight: 800;">301 Redirects plugin</b>! Please open <a href="' . admin_url('options-general.php?page=eps_redirects'). '">Settings - 301 Redirects</a> to manage redirect rules and view the 404 error log.');
|
337 |
|
338 |
update_option('eps_pointers', $pointers);
|
339 |
} // reset_pointers
|
416 |
if (function_exists('rocket_clean_domain')) {
|
417 |
rocket_clean_domain();
|
418 |
}
|
419 |
+
do_action('cache_enabler_clear_complete_cache');
|
420 |
} // empty_cache
|
421 |
|
422 |
|
readme.txt
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
=== 301 Redirects - Easy Redirect Manager ===
|
2 |
Contributors: WebFactory
|
3 |
-
Tags: 301 redirect, redirects, redirect, 404 log, redirection, 302 redirect, 302, seo, 302 redirect, 404, 404 redirect, 301, 307, 404
|
4 |
Requires at least: 4.0
|
5 |
Tested up to: 5.6
|
6 |
-
Stable tag: 2.
|
7 |
Requires PHP: 5.2
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -12,9 +12,10 @@ Easily manage 301 & 302 redirects. Simple to use & validate redirects. Includes
|
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
-
<a href="https://wp301redirects.com/?ref=wporg">301 Redirects</a> helps you manage and create 301, 302, 307 redirects for your WordPress site to **improve SEO and visitor experience**. With a user-friendly interface, 301 Redirects is easy to use. Perfect for new sites or repairing links after reorganizing your existing WordPress content, or when your site has content that expires and you wish to avoid sending visitors to a 404 page. Use the 404 error log to identify problematic links.
|
16 |
|
17 |
-
301 Redirects GUI is located in WP Admin
|
|
|
18 |
|
19 |
**Features**
|
20 |
|
@@ -23,6 +24,7 @@ Easily manage 301 & 302 redirects. Simple to use & validate redirects. Includes
|
|
23 |
* Retain query strings across redirects
|
24 |
* Super-fast redirection
|
25 |
* 404 error log
|
|
|
26 |
* Import/Export feature for bulk redirects management
|
27 |
* Simple redirect stats so you know how much a redirection is used
|
28 |
* Fully compatible with translation plugins (Weglot, TranslatePress, Gtranslate, Loco Translate) that use lang prefix in URL
|
@@ -43,6 +45,9 @@ A 301 redirect indicates that the page requested has been permanently moved to t
|
|
43 |
* Overhauling or re-organizing your existing WordPress content
|
44 |
* You have content that expires (or is otherwise no longer available) and you wish to redirect users elsewhere
|
45 |
|
|
|
|
|
|
|
46 |
**External libraries used in the project**
|
47 |
|
48 |
* <a href="https://github.com/donatj/PhpUserAgent">PHP User Agent Parser</a>
|
@@ -64,6 +69,12 @@ A 301 redirect indicates that the page requested has been permanently moved to t
|
|
64 |
|
65 |
== Changelog ==
|
66 |
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
= 2.60 =
|
68 |
* 2021/02/13
|
69 |
* added 404 error log
|
1 |
=== 301 Redirects - Easy Redirect Manager ===
|
2 |
Contributors: WebFactory
|
3 |
+
Tags: 301 redirect, redirects, redirect, 404 error log, redirection, 302 redirect, 302, seo, 302 redirect, 404, 404 redirect, 301, 307, 404 log
|
4 |
Requires at least: 4.0
|
5 |
Tested up to: 5.6
|
6 |
+
Stable tag: 2.65
|
7 |
Requires PHP: 5.2
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
+
<a href="https://wp301redirects.com/?ref=wporg">301 Redirects</a> helps you manage and create 301, 302, 307 redirects for your WordPress site to **improve SEO and visitor experience**. With a user-friendly interface, 301 Redirects is easy to use. Perfect for new sites or repairing links after reorganizing your existing WordPress content, or when your site has content that expires and you wish to avoid sending visitors to a 404 error page. Use the 404 error log to identify problematic links.
|
16 |
|
17 |
+
301 Redirects GUI is located in WP Admin - Settings - 301 Redirects
|
18 |
+
404 Error Log widget can be found in the WP Admin - Dashboard
|
19 |
|
20 |
**Features**
|
21 |
|
24 |
* Retain query strings across redirects
|
25 |
* Super-fast redirection
|
26 |
* 404 error log
|
27 |
+
* 404 error log widget
|
28 |
* Import/Export feature for bulk redirects management
|
29 |
* Simple redirect stats so you know how much a redirection is used
|
30 |
* Fully compatible with translation plugins (Weglot, TranslatePress, Gtranslate, Loco Translate) that use lang prefix in URL
|
45 |
* Overhauling or re-organizing your existing WordPress content
|
46 |
* You have content that expires (or is otherwise no longer available) and you wish to redirect users elsewhere
|
47 |
|
48 |
+
**Is the 404 error log GDPR friendly?**
|
49 |
+
The 404 error log does not collect user IPs. It collects the following data: timestamp of the event, the (404) URL that was opened, and the user-agent string.
|
50 |
+
|
51 |
**External libraries used in the project**
|
52 |
|
53 |
* <a href="https://github.com/donatj/PhpUserAgent">PHP User Agent Parser</a>
|
69 |
|
70 |
== Changelog ==
|
71 |
|
72 |
+
= 2.65 =
|
73 |
+
* 2021/02/22
|
74 |
+
* added 404 error log Dashboard widget
|
75 |
+
* fixed some bugs
|
76 |
+
* added support for Cache Enabler plugin
|
77 |
+
|
78 |
= 2.60 =
|
79 |
* 2021/02/13
|
80 |
* added 404 error log
|