Eggplant 301 Redirects - Version 2.45

Version Description

  • 2019/12/17
  • security fixes - big thank you to Chloe from Wordfence
  • WP-CLI fix
Download this release

Release Info

Developer WebFactory
Plugin Icon 128x128 Eggplant 301 Redirects
Version 2.45
Comparing to
See all releases

Code changes from version 2.40 to 2.45

class.drop-down-pages.php CHANGED
@@ -10,6 +10,10 @@
10
  * @return string or HTML content, if not displaying.
11
  */
12
 
 
 
 
 
13
 
14
  if (!function_exists('eps_dropdown_pages')) {
15
  function eps_dropdown_pages($args = '')
10
  * @return string or HTML content, if not displaying.
11
  */
12
 
13
+ // include only file
14
+ if (!defined('ABSPATH')) {
15
+ die('Do not open this file directly.');
16
+ }
17
 
18
  if (!function_exists('eps_dropdown_pages')) {
19
  function eps_dropdown_pages($args = '')
css/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Silence is golden.
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.40
6
  Author: WebFactory Ltd
7
  Author URI: https://www.webfactoryltd.com/
8
  Text Domain: eps-301-redirects
@@ -25,14 +25,14 @@ Text Domain: eps-301-redirects
25
 
26
  // include only file
27
  if (!defined('ABSPATH')) {
28
- wp_die(__('Do not open this file directly.', 'eps-301-redirect'));
29
  }
30
 
31
  if (!defined('EPS_REDIRECT_PRO')) {
32
 
33
  define('EPS_REDIRECT_PATH', plugin_dir_path(__FILE__));
34
  define('EPS_REDIRECT_URL', plugins_url() . '/eps-301-redirects/');
35
- define('EPS_REDIRECT_VERSION', '2.3.5');
36
  define('EPS_REDIRECT_PRO', false);
37
 
38
  include(EPS_REDIRECT_PATH . 'eps-form-elements.php');
@@ -68,16 +68,17 @@ if (!defined('EPS_REDIRECT_PRO')) {
68
  add_action('admin_init', array($this, 'clear_cache'));
69
  }
70
 
71
-
72
- // Ajax funcs
73
  add_action('wp_ajax_eps_redirect_get_new_entry', array($this, 'ajax_get_entry'));
74
  add_action('wp_ajax_eps_redirect_delete_entry', array($this, 'ajax_eps_delete_entry'));
75
  add_action('wp_ajax_eps_redirect_get_inline_edit_entry', array($this, 'ajax_get_inline_edit_entry'));
76
  add_action('wp_ajax_eps_redirect_save', array($this, 'ajax_save_redirect'));
77
  add_filter('plugin_action_links_' . plugin_basename(__FILE__), array($this, 'plugin_action_links'));
78
  } else {
79
- add_action('init', array($this, 'do_redirect'), 1); // Priority 1 for redirects.
80
- add_action('template_redirect', array($this, 'check_404'), 1); // Priority 1 for redirects.
 
 
 
81
  }
82
  }
83
 
@@ -226,8 +227,14 @@ if (!defined('EPS_REDIRECT_PRO')) {
226
  public function ajax_save_redirect()
227
  {
228
 
 
 
 
 
 
 
229
  $update = array(
230
- 'id' => ($_POST['id']) ? $_POST['id'] : false,
231
  'url_from' => $_POST['url_from'], // remove the $root from the url if supplied, and a leading /
232
  'url_to' => $_POST['url_to'],
233
  'type' => (is_numeric($_POST['url_to']) ? 'post' : 'url'),
@@ -447,6 +454,12 @@ if (!defined('EPS_REDIRECT_PRO')) {
447
  */
448
  public static function ajax_eps_delete_entry()
449
  {
 
 
 
 
 
 
450
  if (!isset($_POST['id'])) exit();
451
 
452
  global $wpdb;
@@ -495,6 +508,12 @@ public static function get_inline_edit_entry($redirect_id = false)
495
 
496
  public static function ajax_get_inline_edit_entry()
497
  {
 
 
 
 
 
 
498
  $redirect_id = isset($_REQUEST['redirect_id']) ? intval($_REQUEST['redirect_id']) : false;
499
 
500
  ob_start();
@@ -511,6 +530,12 @@ public static function ajax_get_inline_edit_entry()
511
 
512
  public static function ajax_get_entry()
513
  {
 
 
 
 
 
 
514
  echo self::get_entry();
515
  exit();
516
  }
@@ -535,7 +560,7 @@ public function clear_cache()
535
  */
536
  public static function set_ajax_url()
537
  {
538
- echo '<script>var eps_redirect_ajax_url = "' . admin_url('admin-ajax.php') . '"</script>';
539
  }
540
 
541
 
2
  /*
3
  Plugin Name: 301 Redirects
4
  Description: Easily create and manage 301 redirects.
5
+ Version: 2.45
6
  Author: WebFactory Ltd
7
  Author URI: https://www.webfactoryltd.com/
8
  Text Domain: eps-301-redirects
25
 
26
  // include only file
27
  if (!defined('ABSPATH')) {
28
+ die('Do not open this file directly.');
29
  }
30
 
31
  if (!defined('EPS_REDIRECT_PRO')) {
32
 
33
  define('EPS_REDIRECT_PATH', plugin_dir_path(__FILE__));
34
  define('EPS_REDIRECT_URL', plugins_url() . '/eps-301-redirects/');
35
+ define('EPS_REDIRECT_VERSION', '2.45');
36
  define('EPS_REDIRECT_PRO', false);
37
 
38
  include(EPS_REDIRECT_PATH . 'eps-form-elements.php');
68
  add_action('admin_init', array($this, 'clear_cache'));
69
  }
70
 
 
 
71
  add_action('wp_ajax_eps_redirect_get_new_entry', array($this, 'ajax_get_entry'));
72
  add_action('wp_ajax_eps_redirect_delete_entry', array($this, 'ajax_eps_delete_entry'));
73
  add_action('wp_ajax_eps_redirect_get_inline_edit_entry', array($this, 'ajax_get_inline_edit_entry'));
74
  add_action('wp_ajax_eps_redirect_save', array($this, 'ajax_save_redirect'));
75
  add_filter('plugin_action_links_' . plugin_basename(__FILE__), array($this, 'plugin_action_links'));
76
  } else {
77
+ if (defined('WP_CLI') && WP_CLI) {
78
+ } else {
79
+ add_action('init', array($this, 'do_redirect'), 1); // Priority 1 for redirects.
80
+ add_action('template_redirect', array($this, 'check_404'), 1); // Priority 1 for redirects.
81
+ }
82
  }
83
  }
84
 
227
  public function ajax_save_redirect()
228
  {
229
 
230
+ check_ajax_referer('eps_301_save_redirect');
231
+
232
+ if (!current_user_can('manage_options')) {
233
+ wp_die('You are not allowed to run this action.');
234
+ }
235
+
236
  $update = array(
237
+ 'id' => ($_POST['id']) ? intval($_POST['id']) : false,
238
  'url_from' => $_POST['url_from'], // remove the $root from the url if supplied, and a leading /
239
  'url_to' => $_POST['url_to'],
240
  'type' => (is_numeric($_POST['url_to']) ? 'post' : 'url'),
454
  */
455
  public static function ajax_eps_delete_entry()
456
  {
457
+ check_ajax_referer('eps_301_delete_entry');
458
+
459
+ if (!current_user_can('manage_options')) {
460
+ wp_die('You are not allowed to run this action.');
461
+ }
462
+
463
  if (!isset($_POST['id'])) exit();
464
 
465
  global $wpdb;
508
 
509
  public static function ajax_get_inline_edit_entry()
510
  {
511
+ check_ajax_referer('eps_301_get_inline_edit_entry');
512
+
513
+ if (!current_user_can('manage_options')) {
514
+ wp_die('You are not allowed to run this action.');
515
+ }
516
+
517
  $redirect_id = isset($_REQUEST['redirect_id']) ? intval($_REQUEST['redirect_id']) : false;
518
 
519
  ob_start();
530
 
531
  public static function ajax_get_entry()
532
  {
533
+ check_ajax_referer('eps_301_get_entry');
534
+
535
+ if (!current_user_can('manage_options')) {
536
+ wp_die('You are not allowed to run this action.');
537
+ }
538
+
539
  echo self::get_entry();
540
  exit();
541
  }
560
  */
561
  public static function set_ajax_url()
562
  {
563
+ //echo '<script>var eps_redirect_ajax_url = "' . admin_url('admin-ajax.php') . '"</script>';
564
  }
565
 
566
 
eps-form-elements.php CHANGED
@@ -15,6 +15,11 @@
15
  * @version 2.1.0
16
  */
17
 
 
 
 
 
 
18
  /**
19
  *
20
  * GET_TYPE_SELECT
15
  * @version 2.1.0
16
  */
17
 
18
+ // include only file
19
+ if (!defined('ABSPATH')) {
20
+ die('Do not open this file directly.');
21
+ }
22
+
23
  /**
24
  *
25
  * GET_TYPE_SELECT
images/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Silence is golden.
index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Silence is golden.
js/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Silence is golden.
js/scripts.js CHANGED
@@ -48,9 +48,10 @@ jQuery(document).ready(function($) {
48
  // Do the request
49
  $.ajax({
50
  type: 'POST',
51
- url: eps_redirect_ajax_url,
52
  data: {
53
  action: 'eps_redirect_get_inline_edit_entry',
 
54
  redirect_id: redirect_id
55
  },
56
  success: function(data) {
@@ -104,9 +105,10 @@ jQuery(document).ready(function($) {
104
 
105
  $.ajax({
106
  type: 'POST',
107
- url: eps_redirect_ajax_url,
108
  data: {
109
  action: 'eps_redirect_save',
 
110
  id: $('#eps-redirect-save input[name="redirect[id][]"]').val(),
111
  status: $('#eps-redirect-save select[name="redirect[status][]"]').val(),
112
  url_from: $(
@@ -161,9 +163,10 @@ jQuery(document).ready(function($) {
161
  // Do the request
162
  $.ajax({
163
  type: 'POST',
164
- url: eps_redirect_ajax_url,
165
  data: {
166
  action: 'eps_redirect_get_inline_edit_entry',
 
167
  redirect_id: false
168
  },
169
  success: function(data) {
@@ -203,8 +206,9 @@ jQuery(document).ready(function($) {
203
  $(this).prop('disabled', true);
204
  $(this).attr('disabled', 'disabled'); // Disable button to disallow multiple submissions.
205
 
206
- var request = $.post(eps_redirect_ajax_url, {
207
  action: 'eps_redirect_delete_entry',
 
208
  id: $(this).data('id')
209
  });
210
  request.done(function(data) {
48
  // Do the request
49
  $.ajax({
50
  type: 'POST',
51
+ url: ajaxurl,
52
  data: {
53
  action: 'eps_redirect_get_inline_edit_entry',
54
+ _ajax_nonce: eps_301.nonce_get_inline_edit_entry,
55
  redirect_id: redirect_id
56
  },
57
  success: function(data) {
105
 
106
  $.ajax({
107
  type: 'POST',
108
+ url: ajaxurl,
109
  data: {
110
  action: 'eps_redirect_save',
111
+ _ajax_nonce: eps_301.nonce_save_redirect,
112
  id: $('#eps-redirect-save input[name="redirect[id][]"]').val(),
113
  status: $('#eps-redirect-save select[name="redirect[status][]"]').val(),
114
  url_from: $(
163
  // Do the request
164
  $.ajax({
165
  type: 'POST',
166
+ url: ajaxurl,
167
  data: {
168
  action: 'eps_redirect_get_inline_edit_entry',
169
+ _ajax_nonce: eps_301.nonce_get_inline_edit_entry,
170
  redirect_id: false
171
  },
172
  success: function(data) {
206
  $(this).prop('disabled', true);
207
  $(this).attr('disabled', 'disabled'); // Disable button to disallow multiple submissions.
208
 
209
+ var request = $.post(ajaxurl, {
210
  action: 'eps_redirect_delete_entry',
211
+ _ajax_nonce: eps_301.nonce_delete_entry,
212
  id: $(this).data('id')
213
  });
214
  request.done(function(data) {
libs/eps-plugin-options.php CHANGED
@@ -10,6 +10,11 @@
10
  *
11
  */
12
 
 
 
 
 
 
13
  if (!class_exists('EPS_Redirects_Plugin_Options')) {
14
 
15
  class EPS_Redirects_Plugin_Options
10
  *
11
  */
12
 
13
+ // include only file
14
+ if (!defined('ABSPATH')) {
15
+ die('Do not open this file directly.');
16
+ }
17
+
18
  if (!class_exists('EPS_Redirects_Plugin_Options')) {
19
 
20
  class EPS_Redirects_Plugin_Options
libs/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Silence is golden.
plugin.php CHANGED
@@ -8,6 +8,10 @@
8
  */
9
 
10
 
 
 
 
 
11
 
12
  class EPS_Redirects_Plugin
13
  {
@@ -273,9 +277,16 @@ class EPS_Redirects_Plugin
273
  if (is_admin() && isset($_GET['page']) && $_GET['page'] == $EPS_Redirects_Plugin->config('page_slug')) {
274
  wp_enqueue_script('jquery');
275
 
276
-
277
  wp_enqueue_script('eps_redirect_script', EPS_REDIRECT_URL . 'js/scripts.js');
278
  wp_enqueue_style('eps_redirect_styles', EPS_REDIRECT_URL . 'css/eps_redirect.css');
 
 
 
 
 
 
 
 
279
  }
280
 
281
  global $wp_rewrite;
8
  */
9
 
10
 
11
+ // include only file
12
+ if (!defined('ABSPATH')) {
13
+ die('Do not open this file directly.');
14
+ }
15
 
16
  class EPS_Redirects_Plugin
17
  {
277
  if (is_admin() && isset($_GET['page']) && $_GET['page'] == $EPS_Redirects_Plugin->config('page_slug')) {
278
  wp_enqueue_script('jquery');
279
 
 
280
  wp_enqueue_script('eps_redirect_script', EPS_REDIRECT_URL . 'js/scripts.js');
281
  wp_enqueue_style('eps_redirect_styles', EPS_REDIRECT_URL . 'css/eps_redirect.css');
282
+
283
+ $js_vars = array(
284
+ 'nonce_get_entry' => wp_create_nonce('eps_301_get_entry'),
285
+ 'nonce_save_redirect' => wp_create_nonce('eps_301_save_redirect'),
286
+ 'nonce_delete_entry' => wp_create_nonce('eps_301_delete_entry'),
287
+ 'nonce_get_inline_edit_entry' => wp_create_nonce('eps_301_get_inline_edit_entry'),
288
+ );
289
+ wp_localize_script('eps_redirect_script', 'eps_301', $js_vars);
290
  }
291
 
292
  global $wp_rewrite;
readme.txt CHANGED
@@ -1,14 +1,14 @@
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
10
 
11
- Easily manage and create 301 & 302 redirects. Simple to use and validate redirects. Includes redirect stats.
12
 
13
  == Description ==
14
 
@@ -56,6 +56,11 @@ A 301 redirect indicates that the page requested has been permanently moved to t
56
 
57
  == Changelog ==
58
 
 
 
 
 
 
59
  = 2.40 =
60
  * 2019/03/25
61
  * bug fixes
1
  === 301 Redirects - Easy Redirect Manager ===
2
+ Contributors: WebFactory, wpreset, googlemapswidget, 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.4
6
+ Stable tag: 2.45
7
  Requires PHP: 5.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
+ Easily manage and create 301 & 302 redirects. Simple to use & validate redirects. Includes redirect stats.
12
 
13
  == Description ==
14
 
56
 
57
  == Changelog ==
58
 
59
+ = 2.45 =
60
+ * 2019/12/17
61
+ * security fixes - big thank you to Chloe from Wordfence
62
+ * WP-CLI fix
63
+
64
  = 2.40 =
65
  * 2019/03/25
66
  * bug fixes
templates/admin-panel-cache.php CHANGED
@@ -8,12 +8,19 @@
8
  * @package EPS 301 Redirects
9
  * @author WebFactory Ltd
10
  */
 
 
 
 
 
11
  ?>
12
 
13
  <div class="eps-panel eps-margin-top">
14
  <form method="post" action="">
15
  <?php wp_nonce_field('eps_redirect_nonce', 'eps_redirect_nonce_submit'); ?>
16
  <input type="submit" name="eps_redirect_refresh" id="submit" class="button button-secondary" value="Refresh Cache" />
17
- <br><small class="eps-grey-text">Refresh the cache if the dropdowns are out of date.</small>
18
  </form>
19
- </div>
 
 
8
  * @package EPS 301 Redirects
9
  * @author WebFactory Ltd
10
  */
11
+
12
+ // include only file
13
+ if (!defined('ABSPATH')) {
14
+ die('Do not open this file directly.');
15
+ }
16
  ?>
17
 
18
  <div class="eps-panel eps-margin-top">
19
  <form method="post" action="">
20
  <?php wp_nonce_field('eps_redirect_nonce', 'eps_redirect_nonce_submit'); ?>
21
  <input type="submit" name="eps_redirect_refresh" id="submit" class="button button-secondary" value="Refresh Cache" />
22
+ <small style="vertical-align: sub; margin-left: 10px;" class="eps-grey-text">Refresh the cache if the dropdowns are out of date.</small>
23
  </form>
24
+
25
+ <p><br>Please <a href="https://wordpress.org/support/plugin/eps-301-redirects/reviews/?filter=5#new-post" target="_blank">rate the plugin ★★★★★</a> to <b>keep it free &amp; maintained</b>. It only takes a minute to rate. Thank you! 👋</p>
26
+ </div>
templates/admin-panel-donate.php CHANGED
@@ -8,6 +8,11 @@
8
  * @package EPS 301 Redirects
9
  * @author WebFactory Ltd
10
  */
 
 
 
 
 
11
  ?>
12
 
13
  <div id="donate-box" class="eps-panel">
8
  * @package EPS 301 Redirects
9
  * @author WebFactory Ltd
10
  */
11
+
12
+ // include only file
13
+ if (!defined('ABSPATH')) {
14
+ die('Do not open this file directly.');
15
+ }
16
  ?>
17
 
18
  <div id="donate-box" class="eps-panel">
templates/admin-tab-404s.php CHANGED
@@ -8,6 +8,11 @@
8
  * @package EPS 301 Redirects
9
  * @author WebFactory Ltd
10
  */
 
 
 
 
 
11
  ?>
12
 
13
  <div class="wrap">
8
  * @package EPS 301 Redirects
9
  * @author WebFactory Ltd
10
  */
11
+
12
+ // include only file
13
+ if (!defined('ABSPATH')) {
14
+ die('Do not open this file directly.');
15
+ }
16
  ?>
17
 
18
  <div class="wrap">
templates/admin-tab-error.php CHANGED
@@ -8,6 +8,11 @@
8
  * @package EPS 301 Redirects
9
  * @author WebFactory Ltd
10
  */
 
 
 
 
 
11
  ?>
12
 
13
 
8
  * @package EPS 301 Redirects
9
  * @author WebFactory Ltd
10
  */
11
+
12
+ // include only file
13
+ if (!defined('ABSPATH')) {
14
+ die('Do not open this file directly.');
15
+ }
16
  ?>
17
 
18
 
templates/admin-tab-import-export.php CHANGED
@@ -8,6 +8,11 @@
8
  * @package EPS 301 Redirects
9
  * @author WebFactory Ltd
10
  */
 
 
 
 
 
11
  ?>
12
 
13
  <div class="wrap">
8
  * @package EPS 301 Redirects
9
  * @author WebFactory Ltd
10
  */
11
+
12
+ // include only file
13
+ if (!defined('ABSPATH')) {
14
+ die('Do not open this file directly.');
15
+ }
16
  ?>
17
 
18
  <div class="wrap">
templates/admin-tab-redirects.php CHANGED
@@ -8,9 +8,13 @@
8
  * @package EPS 301 Redirects
9
  * @author WebFactory Ltd
10
  */
11
- global $EPS_Redirects_Plugin;
12
 
 
 
 
 
13
 
 
14
  ?>
15
 
16
  <div class="wrap">
8
  * @package EPS 301 Redirects
9
  * @author WebFactory Ltd
10
  */
 
11
 
12
+ // include only file
13
+ if (!defined('ABSPATH')) {
14
+ die('Do not open this file directly.');
15
+ }
16
 
17
+ global $EPS_Redirects_Plugin;
18
  ?>
19
 
20
  <div class="wrap">
templates/admin-tab-support.php CHANGED
@@ -8,6 +8,11 @@
8
  * @package EPS 301 Redirects
9
  * @author WebFactory Ltd
10
  */
 
 
 
 
 
11
  ?>
12
 
13
  <div class="wrap">
@@ -16,9 +21,8 @@
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>
8
  * @package EPS 301 Redirects
9
  * @author WebFactory Ltd
10
  */
11
+
12
+ // include only file
13
+ if (!defined('ABSPATH')) {
14
+ die('Do not open this file directly.');
15
+ }
16
  ?>
17
 
18
  <div class="wrap">
21
  <div class="eps-panel eps-margin-top group">
22
  <h1>Support</h1><br>
23
  <ul class="plain-list">
24
+ <li>Support is available through plugin's <a href="https://wordpress.org/support/plugin/eps-301-redirects/" target="_blank">WP.org forum</a> - <b>our average response time is just a few hours</b></li>
25
  <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>
 
26
  <li>You can always catch us on Twitter <a href="https://twitter.com/webfactoryltd/" target="_blank">@webfactoryltd</a></li>
27
  </ul>
28
  </div>
templates/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Silence is golden.
templates/template.redirect-entry-edit-inline.php CHANGED
@@ -10,6 +10,10 @@
10
  */
11
 
12
 
 
 
 
 
13
  ?>
14
  <tr id="eps-redirect-edit">
15
  <td colspan="5">
10
  */
11
 
12
 
13
+ // include only file
14
+ if (!defined('ABSPATH')) {
15
+ die('Do not open this file directly.');
16
+ }
17
  ?>
18
  <tr id="eps-redirect-edit">
19
  <td colspan="5">
templates/template.redirect-entry-edit.php CHANGED
@@ -9,8 +9,12 @@
9
  * @author WebFactory Ltd
10
  */
11
 
12
- $redirect = self::get_redirect($redirect_id);
 
 
 
13
 
 
14
  ?>
15
  <td>
16
  <input type="hidden" type="text" name="redirect[id][]" value="<?php echo ($redirect_id) ? $redirect_id : ''; ?>">
9
  * @author WebFactory Ltd
10
  */
11
 
12
+ // include only file
13
+ if (!defined('ABSPATH')) {
14
+ die('Do not open this file directly.');
15
+ }
16
 
17
+ $redirect = self::get_redirect($redirect_id);
18
  ?>
19
  <td>
20
  <input type="hidden" type="text" name="redirect[id][]" value="<?php echo ($redirect_id) ? $redirect_id : ''; ?>">
templates/template.redirect-entry.php CHANGED
@@ -8,10 +8,14 @@
8
  * @author WebFactory Ltd
9
  */
10
 
 
 
 
 
 
11
  global $EPS_Redirects_Plugin;
12
  $query_args = array('page' => $EPS_Redirects_Plugin->config('page_slug'), 'delete_redirect' => esc_attr($redirect->id));
13
 
14
-
15
  ?>
16
  <tr class="redirect-entry <?php echo esc_attr($redirect->status); ?> id-<?php echo esc_attr($redirect->id); ?>"
17
  data-id="<?php echo esc_attr($redirect->id); ?>" data-status="<?php echo esc_attr($redirect->status); ?>">
8
  * @author WebFactory Ltd
9
  */
10
 
11
+ // include only file
12
+ if (!defined('ABSPATH')) {
13
+ die('Do not open this file directly.');
14
+ }
15
+
16
  global $EPS_Redirects_Plugin;
17
  $query_args = array('page' => $EPS_Redirects_Plugin->config('page_slug'), 'delete_redirect' => esc_attr($redirect->id));
18
 
 
19
  ?>
20
  <tr class="redirect-entry <?php echo esc_attr($redirect->status); ?> id-<?php echo esc_attr($redirect->id); ?>"
21
  data-id="<?php echo esc_attr($redirect->id); ?>" data-status="<?php echo esc_attr($redirect->status); ?>">