Version Description
- 2019/03/25
- bug fixes
- rating notification
Download this release
Release Info
| Developer | WebFactory |
| Plugin | |
| Version | 2.40 |
| Comparing to | |
| See all releases | |
Code changes from version 2.3.5 to 2.40
- css/eps_redirect.css +13 -0
- eps-301-redirects.php +1 -1
- options.json +6 -0
- plugin.php +67 -1
- readme.txt +9 -4
- templates/admin-tab-support.php +34 -0
css/eps_redirect.css
CHANGED
|
@@ -364,3 +364,16 @@ a.button.eps-redirect-remove:hover {
|
|
| 364 |
display: none;
|
| 365 |
}
|
| 366 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 364 |
display: none;
|
| 365 |
}
|
| 366 |
}
|
| 367 |
+
|
| 368 |
+
.plain-list {
|
| 369 |
+
margin-top: 5px;
|
| 370 |
+
list-style-type: circle;
|
| 371 |
+
list-style-position: inside;
|
| 372 |
+
}
|
| 373 |
+
|
| 374 |
+
.plain-list li {
|
| 375 |
+
text-indent: -18px;
|
| 376 |
+
padding-left: 23px;
|
| 377 |
+
line-height: 23px;
|
| 378 |
+
margin: 0;
|
| 379 |
+
}
|
eps-301-redirects.php
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
/*
|
| 3 |
Plugin Name: 301 Redirects
|
| 4 |
Description: Easily create and manage 301 redirects.
|
| 5 |
-
Version: 2.
|
| 6 |
Author: WebFactory Ltd
|
| 7 |
Author URI: https://www.webfactoryltd.com/
|
| 8 |
Text Domain: eps-301-redirects
|
| 2 |
/*
|
| 3 |
Plugin Name: 301 Redirects
|
| 4 |
Description: Easily create and manage 301 redirects.
|
| 5 |
+
Version: 2.40
|
| 6 |
Author: WebFactory Ltd
|
| 7 |
Author URI: https://www.webfactoryltd.com/
|
| 8 |
Text Domain: eps-301-redirects
|
options.json
CHANGED
|
@@ -16,5 +16,11 @@
|
|
| 16 |
"description": "",
|
| 17 |
"callback": "import_export",
|
| 18 |
"fields": {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
}
|
| 20 |
}
|
| 16 |
"description": "",
|
| 17 |
"callback": "import_export",
|
| 18 |
"fields": {}
|
| 19 |
+
},
|
| 20 |
+
"support": {
|
| 21 |
+
"title": "Support",
|
| 22 |
+
"description": "",
|
| 23 |
+
"callback": "support",
|
| 24 |
+
"fields": {}
|
| 25 |
}
|
| 26 |
}
|
plugin.php
CHANGED
|
@@ -59,10 +59,13 @@ class EPS_Redirects_Plugin
|
|
| 59 |
// Template Hooks
|
| 60 |
add_action('redirects_admin_tab', array($this, 'admin_tab_redirects'), 10, 1);
|
| 61 |
add_action('404s_admin_tab', array($this, 'admin_tab_404s'), 10, 1);
|
|
|
|
| 62 |
add_action('error_admin_tab', array($this, 'admin_tab_error'), 10, 1);
|
| 63 |
add_action('import-export_admin_tab', array($this, 'admin_tab_import_export'), 10, 1);
|
| 64 |
add_action('eps_redirects_panels_left', array($this, 'admin_panel_cache'));
|
| 65 |
-
add_action('eps_redirects_panels_right', array($this, 'admin_panel_donate'));
|
|
|
|
|
|
|
| 66 |
|
| 67 |
// Actions
|
| 68 |
add_action('admin_init', array($this, 'check_plugin_actions'));
|
|
@@ -101,6 +104,65 @@ class EPS_Redirects_Plugin
|
|
| 101 |
public static function _deactivation()
|
| 102 |
{ }
|
| 103 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 104 |
|
| 105 |
public function admin_url($vars = array())
|
| 106 |
{
|
|
@@ -494,6 +556,10 @@ class EPS_Redirects_Plugin
|
|
| 494 |
{
|
| 495 |
include(EPS_REDIRECT_PATH . 'templates/admin-tab-404s.php');
|
| 496 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 497 |
public static function admin_tab_import_export($options)
|
| 498 |
{
|
| 499 |
include(EPS_REDIRECT_PATH . 'templates/admin-tab-import-export.php');
|
| 59 |
// Template Hooks
|
| 60 |
add_action('redirects_admin_tab', array($this, 'admin_tab_redirects'), 10, 1);
|
| 61 |
add_action('404s_admin_tab', array($this, 'admin_tab_404s'), 10, 1);
|
| 62 |
+
add_action('support_admin_tab', array($this, 'admin_tab_support'), 10, 1);
|
| 63 |
add_action('error_admin_tab', array($this, 'admin_tab_error'), 10, 1);
|
| 64 |
add_action('import-export_admin_tab', array($this, 'admin_tab_import_export'), 10, 1);
|
| 65 |
add_action('eps_redirects_panels_left', array($this, 'admin_panel_cache'));
|
| 66 |
+
//add_action('eps_redirects_panels_right', array($this, 'admin_panel_donate'));
|
| 67 |
+
add_action('admin_notices', array($this, 'show_review_notice'));
|
| 68 |
+
add_action('admin_action_301_dismiss_notice', array($this, 'dismiss_notice'));
|
| 69 |
|
| 70 |
// Actions
|
| 71 |
add_action('admin_init', array($this, 'check_plugin_actions'));
|
| 104 |
public static function _deactivation()
|
| 105 |
{ }
|
| 106 |
|
| 107 |
+
// handle dismiss button for notices
|
| 108 |
+
static function dismiss_notice()
|
| 109 |
+
{
|
| 110 |
+
if (empty($_GET['notice'])) {
|
| 111 |
+
wp_safe_redirect(admin_url());
|
| 112 |
+
exit;
|
| 113 |
+
}
|
| 114 |
+
|
| 115 |
+
$notices = get_option('301-redirects-notices', array());
|
| 116 |
+
|
| 117 |
+
if ($_GET['notice'] == 'rate') {
|
| 118 |
+
$notices['dismiss_rate'] = true;
|
| 119 |
+
} else {
|
| 120 |
+
wp_safe_redirect(admin_url());
|
| 121 |
+
exit;
|
| 122 |
+
}
|
| 123 |
+
|
| 124 |
+
update_option('301-redirects-notices', $notices);
|
| 125 |
+
|
| 126 |
+
if (!empty($_GET['redirect'])) {
|
| 127 |
+
wp_safe_redirect($_GET['redirect']);
|
| 128 |
+
} else {
|
| 129 |
+
wp_safe_redirect(admin_url());
|
| 130 |
+
}
|
| 131 |
+
|
| 132 |
+
exit;
|
| 133 |
+
} // dismiss_notice
|
| 134 |
+
|
| 135 |
+
function show_review_notice()
|
| 136 |
+
{
|
| 137 |
+
global $wpdb;
|
| 138 |
+
$table_name = $wpdb->prefix . "redirects";
|
| 139 |
+
|
| 140 |
+
if (@$_GET['page'] != 'eps_redirects') {
|
| 141 |
+
return;
|
| 142 |
+
}
|
| 143 |
+
|
| 144 |
+
$notices = get_option('301-redirects-notices', array());
|
| 145 |
+
if (!empty($notices['dismiss_rate'])) {
|
| 146 |
+
return false;
|
| 147 |
+
}
|
| 148 |
+
|
| 149 |
+
$tmp1 = $wpdb->get_var("SELECT SUM(count) FROM $table_name");
|
| 150 |
+
$tmp2 = $wpdb->get_var("SELECT COUNT(id) FROM $table_name");
|
| 151 |
+
|
| 152 |
+
if ($tmp1 < 4 || $tmp2 < 2) {
|
| 153 |
+
return;
|
| 154 |
+
}
|
| 155 |
+
|
| 156 |
+
$rate_url = 'https://wordpress.org/support/plugin/eps-301-redirects/reviews/?filter=5&rate=5#new-post';
|
| 157 |
+
$dismiss_url = add_query_arg(array('action' => '301_dismiss_notice', 'notice' => 'rate', 'redirect' => urlencode($_SERVER['REQUEST_URI'])), admin_url('admin.php'));
|
| 158 |
+
|
| 159 |
+
echo '<div id="301_rate_notice" style="font-size: 14px;" class="notice-info notice"><p>Hi!<br>Saw that you already have ' . $tmp2 . ' redirect rules that got used ' . $tmp1 . ' times - that\'s awesome! We wanted to ask for your help to <b>make the plugin better</b>.<br>We just need a minute of your time to rate the plugin. It helps us out a lot!';
|
| 160 |
+
|
| 161 |
+
echo '<br><a target="_blank" href="' . esc_url($rate_url) . '" style="vertical-align: baseline; margin-top: 15px;" class="button-primary">Help make the plugin better by rating it</a>';
|
| 162 |
+
echo ' <a href="' . esc_url($dismiss_url) . '">I\'ve already rated the plugin</a>';
|
| 163 |
+
echo '<br><br><b>Thank you very much!</b> The 301 Redirects team';
|
| 164 |
+
echo '</p></div>';
|
| 165 |
+
} // show_review_notice
|
| 166 |
|
| 167 |
public function admin_url($vars = array())
|
| 168 |
{
|
| 556 |
{
|
| 557 |
include(EPS_REDIRECT_PATH . 'templates/admin-tab-404s.php');
|
| 558 |
}
|
| 559 |
+
public static function admin_tab_support($options)
|
| 560 |
+
{
|
| 561 |
+
include(EPS_REDIRECT_PATH . 'templates/admin-tab-support.php');
|
| 562 |
+
}
|
| 563 |
public static function admin_tab_import_export($options)
|
| 564 |
{
|
| 565 |
include(EPS_REDIRECT_PATH . 'templates/admin-tab-import-export.php');
|
readme.txt
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
-
=== 301 Redirects ===
|
| 2 |
Contributors: WebFactory, wpreset, googlemapswidget, securityninja, underconstructionpage
|
| 3 |
-
Tags: 301
|
| 4 |
Requires at least: 4.0
|
| 5 |
-
Tested up to: 5.
|
| 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
|
|
@@ -56,6 +56,11 @@ A 301 redirect indicates that the page requested has been permanently moved to t
|
|
| 56 |
|
| 57 |
== Changelog ==
|
| 58 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
= 2.3.5 =
|
| 60 |
* 2019/03/11
|
| 61 |
* WebFactory took over development
|
| 1 |
+
=== 301 Redirects - Easy Redirect Manager ===
|
| 2 |
Contributors: WebFactory, wpreset, googlemapswidget, securityninja, underconstructionpage
|
| 3 |
+
Tags: 301 redirect, redirects, redirect, 302 redirect, redirection, 302, seo, 302 redirect, 404, 404 redirect, 301
|
| 4 |
Requires at least: 4.0
|
| 5 |
+
Tested up to: 5.2
|
| 6 |
+
Stable tag: 2.40
|
| 7 |
Requires PHP: 5.2
|
| 8 |
License: GPLv2 or later
|
| 9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 56 |
|
| 57 |
== Changelog ==
|
| 58 |
|
| 59 |
+
= 2.40 =
|
| 60 |
+
* 2019/03/25
|
| 61 |
+
* bug fixes
|
| 62 |
+
* rating notification
|
| 63 |
+
|
| 64 |
= 2.3.5 =
|
| 65 |
* 2019/03/11
|
| 66 |
* WebFactory took over development
|
templates/admin-tab-support.php
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
*
|
| 4 |
+
* The Support Tab.
|
| 5 |
+
*
|
| 6 |
+
* The main admin area for the 404 tab.
|
| 7 |
+
*
|
| 8 |
+
* @package EPS 301 Redirects
|
| 9 |
+
* @author WebFactory Ltd
|
| 10 |
+
*/
|
| 11 |
+
?>
|
| 12 |
+
|
| 13 |
+
<div class="wrap">
|
| 14 |
+
<?php do_action('eps_redirects_admin_head'); ?>
|
| 15 |
+
|
| 16 |
+
<div class="eps-panel eps-margin-top group">
|
| 17 |
+
<h1>Support</h1><br>
|
| 18 |
+
<ul class="plain-list">
|
| 19 |
+
<li>Public support is available through plugin's <a href="https://wordpress.org/support/plugin/eps-301-redirects/" target="_blank">WP.org forum</a></li>
|
| 20 |
+
<li>Please send comments, questions, bugs and feature requests on the <a href="https://wordpress.org/support/plugin/eps-301-redirects/" target="_blank">forum</a> too</li>
|
| 21 |
+
<li>If you need private support emails us on <a href="mailto:support@webfactoryltd.com?subject=301%20Redirects%20plugin">support@webfactoryltd.com</a></li>
|
| 22 |
+
<li>You can always catch us on Twitter <a href="https://twitter.com/webfactoryltd/" target="_blank">@webfactoryltd</a></li>
|
| 23 |
+
</ul>
|
| 24 |
+
</div>
|
| 25 |
+
|
| 26 |
+
<div class="right">
|
| 27 |
+
<?php ?>
|
| 28 |
+
</div>
|
| 29 |
+
<div class="left">
|
| 30 |
+
<?php
|
| 31 |
+
// do_action('eps_redirects_panels_left');
|
| 32 |
+
?>
|
| 33 |
+
</div>
|
| 34 |
+
</div>
|
