SEO Redirection Plugin - Version 8.1

Version Description

  • Important security fixes.
Download this release

Release Info

Developer osamaesh
Plugin Icon 128x128 SEO Redirection Plugin
Version 8.1
Comparing to
See all releases

Code changes from version 7.9 to 8.1

common/customJs.js CHANGED
@@ -21,14 +21,14 @@ jQuery(document).ready(function () {
21
  swal.clickConfirm();
22
  });
23
  $(document).on('click', '.SwalBtn3', function() {
24
- sessionStorage.setItem("bool", "1");
25
  swal.clickConfirm();
26
  });
27
 
28
  if(sessionStorage && (firstparam=="?page=seo-redirection.php" && !secoundparam) || secoundparam=="tab=cutom")
29
  {
30
 
31
- if (seoredirection.msg.length > 0 && !sessionStorage.getItem("bool")==true)
32
  {
33
  swal({
34
  title:"Don't lose your traffic!<br><br>"+
21
  swal.clickConfirm();
22
  });
23
  $(document).on('click', '.SwalBtn3', function() {
24
+ sessionStorage.setItem("sr_pop", "1");
25
  swal.clickConfirm();
26
  });
27
 
28
  if(sessionStorage && (firstparam=="?page=seo-redirection.php" && !secoundparam) || secoundparam=="tab=cutom")
29
  {
30
 
31
+ if (seoredirection.msg.length > 0 && !sessionStorage.getItem("sr_pop")==true)
32
  {
33
  swal({
34
  title:"Don't lose your traffic!<br><br>"+
custom/functions.php CHANGED
@@ -120,7 +120,7 @@ function WPSR_Get_total_404()
120
  global $wpdb,$table_prefix;
121
  $table_name = $table_prefix . 'WP_SEO_404_links';
122
  $thecount = $wpdb->get_row("select count(DISTINCT link) as tot from $table_name");
123
- return number_format($thecount->tot);
124
 
125
  }}
126
 
120
  global $wpdb,$table_prefix;
121
  $table_name = $table_prefix . 'WP_SEO_404_links';
122
  $thecount = $wpdb->get_row("select count(DISTINCT link) as tot from $table_name");
123
+ return ($thecount->tot);
124
 
125
  }}
126
 
options/option_page_goptions.php CHANGED
@@ -192,7 +192,7 @@ $options= $util->get_my_options();
192
  </td></tr>
193
 
194
  <tr><td>
195
- Redirect All Unknown 404 Pages to: <input type="text" name="redirect_to" id="redirect_to" size="30" value="<?php echo esc_attr_e($options['p404_redirect_to'])?>">
196
  </td></tr>
197
 
198
  </table>
@@ -200,7 +200,7 @@ $options= $util->get_my_options();
200
  <input style="margin-left:5px" class="button-primary" type="submit" value="Save 404 Redirection Options" name="save_404_options">
201
  <input style="margin-left:5px" class="button-primary" type="submit" value="Clear All Discovered 404 Pages" name="clear_all_404">
202
 
203
-
204
 
205
  <h3><?php _e("Redrection Data Options","seo-redirection"); ?><hr></h3>
206
  <table class="cform" align="center" width="100%">
192
  </td></tr>
193
 
194
  <tr><td>
195
+ Redirect All Unknown 404 Pages to: <input type="text" name="redirect_to" id="redirect_to" size="30" value="<?php echo esc_attr_e($options['p404_redirect_to'])?>">&nbsp;<span style="color:red">Have many broken links?</span>&nbsp;<a target="_blank" href="https://www.wp-buy.com/product/seo-redirection-premium-wordpress-plugin/">Click here to fix and improve your site SEO</a>
196
  </td></tr>
197
 
198
  </table>
200
  <input style="margin-left:5px" class="button-primary" type="submit" value="Save 404 Redirection Options" name="save_404_options">
201
  <input style="margin-left:5px" class="button-primary" type="submit" value="Clear All Discovered 404 Pages" name="clear_all_404">
202
 
203
+ <br/><br/>
204
 
205
  <h3><?php _e("Redrection Data Options","seo-redirection"); ?><hr></h3>
206
  <table class="cform" align="center" width="100%">
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: wp-buy, osama.esh
3
  Tags: post, admin, seo, pages, manage, 301, 404, soft 404, redirect, permalink, redirection, redirection, https, automatic redirection, htaccess, ssl, https redirection, ssl certificate, secure page, secure, force ssl, force https, seo redirection, post redirect, 404 to 301
4
  Requires at least: 4.1
5
  Tested up to: 5.8
6
- Stable tag: 7.9
7
 
8
  SEO Redirection is a powerful redirect manager to manage 301 redirects without requiring knowledge of Apache .htaccess files.
9
 
@@ -73,6 +73,8 @@ Yes, here is the plugin full knowledge base http://www.clogica.com/kb/
73
 
74
  == Upgrade Notice ==
75
 
 
 
76
 
77
 
78
  = 7.9 =
@@ -207,6 +209,50 @@ Yes, here is the plugin full knowledge base http://www.clogica.com/kb/
207
 
208
  == Changelog ==
209
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
210
  = 6.3 =
211
  * Bugs fixed
212
  * Can delete 404 log
3
  Tags: post, admin, seo, pages, manage, 301, 404, soft 404, redirect, permalink, redirection, redirection, https, automatic redirection, htaccess, ssl, https redirection, ssl certificate, secure page, secure, force ssl, force https, seo redirection, post redirect, 404 to 301
4
  Requires at least: 4.1
5
  Tested up to: 5.8
6
+ Stable tag: 8.1
7
 
8
  SEO Redirection is a powerful redirect manager to manage 301 redirects without requiring knowledge of Apache .htaccess files.
9
 
73
 
74
  == Upgrade Notice ==
75
 
76
+ = 8.1 =
77
+ * Important security fixes.
78
 
79
 
80
  = 7.9 =
209
 
210
  == Changelog ==
211
 
212
+ = 8.1 =
213
+ * Important security fixes.
214
+
215
+
216
+ = 7.9 =
217
+ * Security Bug fixing - Using nonce in deleting redirects
218
+
219
+
220
+ = 7.8 =
221
+ * Bug fixing - CSRF issue
222
+
223
+
224
+ = 7.7 =
225
+ * Bug fixing (solving http URLs issue)
226
+
227
+
228
+ = 7.6 =
229
+ * Escaping data - part 2
230
+
231
+
232
+ = 7.5 =
233
+ * Escaping data
234
+
235
+
236
+ = 7.4 =
237
+ * Escaping data & Bug fixing
238
+
239
+
240
+ = 7.3 =
241
+ * Bug fixing (solving datatable issues)
242
+
243
+
244
+ = 7.2 =
245
+ * Bug fixing (solving security issues) - part 2
246
+
247
+
248
+ = 7.1 =
249
+ * Bug fixing (solving security issues) - part 1
250
+
251
+
252
+ = 6.4 =
253
+ * Bugs fixed
254
+
255
+
256
  = 6.3 =
257
  * Bugs fixed
258
  * Can delete 404 log
seo-redirection.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: SEO Redirection
4
  Plugin URI: https://www.wp-buy.com/product/seo-redirection-premium-wordpress-plugin/
5
  Description: By this plugin you can manage all your website redirection types easily.
6
  Author: wp-buy
7
- Version: 7.9
8
  Author URI: https://www.wp-buy.com
9
  Text Domain: seo-redirection
10
  */
@@ -560,7 +560,7 @@ if(!function_exists("WPSR_header_code")) {
560
  wp_enqueue_style('c_admin_css_custom');
561
 
562
  wp_enqueue_script('custom', plugins_url() . '/' . basename(dirname(__FILE__)) . '/common/js/' . 'bootstrap.min.js', array('jquery'), false, true);
563
- wp_enqueue_script('customJS', plugins_url() . '/' . basename(dirname(__FILE__)) . '/common/' . "customJs.js", array('jquery'), false, true);
564
  wp_enqueue_script('sweetalert', plugins_url() . '/' . basename(dirname(__FILE__)) . '/common/js/' . "sweetalert.min.js", array('jquery'), false, true);
565
 
566
  wp_enqueue_style('bootstrap', plugins_url() . '/' . basename(dirname(__FILE__)) . '/common/' . "bootstrap.css");
@@ -908,12 +908,22 @@ if(!function_exists("WPSR_options_menu")) {
908
  } else if ($util->get_option_value('plugin_status') == '2') {
909
  $util->info_option_msg(__('SEO Redirection is', 'seo-redirection') . ' <b>' . __('disabled for admin', 'seo-redirection') . '</b>' . __(' only, you can go to option tab and enable it!', 'seo-redirection'));
910
  }
911
- $total_404_errors = (WPSR_Get_total_404() > 10) ? __('You have', 'seo-redirection') . ' <b style="color:red; background-color:yellow; padding:3px;"> too many </b>' . __(' broken link (404 links)', 'seo-redirection') . ', <br>' : '';
912
 
913
 
914
  echo '<div class="wrap"><h2>' . __("SEO Redirection Free", 'seo-redirection') . '</h2><b>' . __('Upgrade to', 'seo-redirection') . ' <a target="_blank" onclick="swal.clickConfirm();" href="https://www.wp-buy.com/product/seo-redirection-premium-wordpress-plugin/">' . __("Pro Version", "seo-redirection") . '</a>' . __(" to manage 404 errors and empower your site SEO", "seo-redirection") . '&nbsp;&nbsp;&nbsp;<strong style="color:yellow; background-color:red; padding:3px;"> ' . __("NOW 50% OFF ", 'seo-redirection') . '</strong></b><br/><br/>';
915
 
 
 
 
916
 
 
 
 
 
 
 
 
917
  if (is_multisite()) {
918
 
919
  echo '<div class="error" id="message"><p></p><div class="warning_icon"></div>' . __('This version does not support Multisite WordPress installation, you may face troubles like losing redirects when adding new sites to your network, the premium version supports multisite well', 'seo-redirection') . '(<a target="_blank" href="https://www.wp-buy.com/product/seo-redirection-premium-wordpress-plugin/">
@@ -934,7 +944,11 @@ https://www.wp-buy.com/product/seo-redirection-premium-wordpress-plugin/</a>) <p
934
  $mytabs->add_file_tab('premium', '<span style="color:brown;"><b>&#9658; ' . __('Premium Features', 'seo-redirection') . '</b></span>', 'premium.php', 'file');
935
  $mytabs->run();
936
 
937
- }
 
 
 
 
938
  }
939
  if(!function_exists("WPSR_upgrade")) {
940
 
@@ -1387,3 +1401,72 @@ if(!function_exists("SR_init_delete_callback")) {
1387
  }
1388
  }
1389
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  Plugin URI: https://www.wp-buy.com/product/seo-redirection-premium-wordpress-plugin/
5
  Description: By this plugin you can manage all your website redirection types easily.
6
  Author: wp-buy
7
+ Version: 8.1
8
  Author URI: https://www.wp-buy.com
9
  Text Domain: seo-redirection
10
  */
560
  wp_enqueue_style('c_admin_css_custom');
561
 
562
  wp_enqueue_script('custom', plugins_url() . '/' . basename(dirname(__FILE__)) . '/common/js/' . 'bootstrap.min.js', array('jquery'), false, true);
563
+ wp_enqueue_script('customJS', plugins_url() . '/' . basename(dirname(__FILE__)) . '/common/' . "customJs.js", array('jquery'), 1.1, true);
564
  wp_enqueue_script('sweetalert', plugins_url() . '/' . basename(dirname(__FILE__)) . '/common/js/' . "sweetalert.min.js", array('jquery'), false, true);
565
 
566
  wp_enqueue_style('bootstrap', plugins_url() . '/' . basename(dirname(__FILE__)) . '/common/' . "bootstrap.css");
908
  } else if ($util->get_option_value('plugin_status') == '2') {
909
  $util->info_option_msg(__('SEO Redirection is', 'seo-redirection') . ' <b>' . __('disabled for admin', 'seo-redirection') . '</b>' . __(' only, you can go to option tab and enable it!', 'seo-redirection'));
910
  }
911
+ $total_404_errors = (WPSR_Get_total_404() > 5) ? __('You have', 'seo-redirection') . ' <b style="color:red; background-color:yellow; padding:3px;">' . intval(WPSR_Get_total_404()) .'</b>' . __(' broken link (404 links)', 'seo-redirection') . ', <br>'.'<div class="wrap" style="font-weight:normal; line-height:30px">' . __('Upgrade to', 'wsr') . ' <a target="_blank" href="https://www.wp-buy.com/product/seo-redirection-premium-wordpress-plugin">' . __("pro version", "wsr") . '</a>' . __(" to manage 404 errors and empower your site SEO", "wsr").'</div>' : '';
912
 
913
 
914
  echo '<div class="wrap"><h2>' . __("SEO Redirection Free", 'seo-redirection') . '</h2><b>' . __('Upgrade to', 'seo-redirection') . ' <a target="_blank" onclick="swal.clickConfirm();" href="https://www.wp-buy.com/product/seo-redirection-premium-wordpress-plugin/">' . __("Pro Version", "seo-redirection") . '</a>' . __(" to manage 404 errors and empower your site SEO", "seo-redirection") . '&nbsp;&nbsp;&nbsp;<strong style="color:yellow; background-color:red; padding:3px;"> ' . __("NOW 50% OFF ", 'seo-redirection') . '</strong></b><br/><br/>';
915
 
916
+ if ($total_404_errors != '') {
917
+ ?>
918
+ <script type="text/javascript">
919
 
920
+ seoredirection.msg = '<?php echo wp_kses_post($total_404_errors); ?>';
921
+
922
+ </script>
923
+
924
+ <?php
925
+ }
926
+
927
  if (is_multisite()) {
928
 
929
  echo '<div class="error" id="message"><p></p><div class="warning_icon"></div>' . __('This version does not support Multisite WordPress installation, you may face troubles like losing redirects when adding new sites to your network, the premium version supports multisite well', 'seo-redirection') . '(<a target="_blank" href="https://www.wp-buy.com/product/seo-redirection-premium-wordpress-plugin/">
944
  $mytabs->add_file_tab('premium', '<span style="color:brown;"><b>&#9658; ' . __('Premium Features', 'seo-redirection') . '</b></span>', 'premium.php', 'file');
945
  $mytabs->run();
946
 
947
+ $imgpath = $util->get_plugin_url() . 'custom/images/';
948
+
949
+ echo '<p>&nbsp;</p><p style="color:green"><a target="_blank" href="http://www.wp-buy.com/product/seo-redirection-premium-wordpress-plugin"><b>' . __("Upgrade to premium version now", "wsr") . '</b></a>' . __(" to get more features", "wsr") . ' , <small>' . __("The premium version of SEO redirection is completely different from the free version as there are a lot more features included.", "wsr") . '</small></p>';
950
+ echo __('<p><a href="https://www.wp-buy.com/product/seo-redirection-premium-wordpress-plugin" target="_blank"><img src="' . $imgpath . 'seopro.png" /></a></p>');
951
+ }
952
  }
953
  if(!function_exists("WPSR_upgrade")) {
954
 
1401
  }
1402
  }
1403
  }
1404
+
1405
+
1406
+
1407
+
1408
+ //---------------------------------------------------------------
1409
+
1410
+ function WPSR_HideMessageAjaxFunction()
1411
+ {
1412
+ add_option('nsr_upgrade_message', 'yes');
1413
+ }
1414
+
1415
+
1416
+ function WPSR_after_plugin_row($plugin_file, $plugin_data, $status)
1417
+ {
1418
+
1419
+ if (get_option('nsr_upgrade_message') != 'yes') {
1420
+ $class_name = $plugin_data['slug'];
1421
+
1422
+ echo '<tr id="' . $class_name . '-plugin-update-tr" class="plugin-update-tr active">';
1423
+ echo '<td colspan="6" class="plugin-update">';
1424
+ echo '<div id="' . $class_name . '-upgradeMsg" class="update-message notice inline notice-warning notice-alt" >';
1425
+
1426
+ echo 'You are running SEO redirection free. To get more features, you can <a href="http://www.wp-buy.com/product/seo-redirection-premium-wordpress-plugin" target="_blank"><strong>upgrade now</strong></a> or ';
1427
+
1428
+ echo '<span id="HideMe" style="cursor:pointer" ><a href="javascript:void(0)"><strong>dismiss</strong></a> this message</span>';
1429
+ echo '</div>';
1430
+ echo '</td>';
1431
+ echo '</tr>';
1432
+
1433
+ ?>
1434
+
1435
+ <script type="text/javascript">
1436
+ jQuery(document).ready(function () {
1437
+ var row = jQuery('#<?php echo $class_name;?>-plugin-update-tr').closest('tr').prev();
1438
+ jQuery(row).addClass('update');
1439
+
1440
+ jQuery("#HideMe").click(function () {
1441
+ jQuery.ajax({
1442
+ type: 'POST',
1443
+ url: '<?php echo admin_url();?>/admin-ajax.php',
1444
+ data: {
1445
+ action: 'WPSR_HideMessageAjaxFunction'
1446
+ },
1447
+ success: function (data, textStatus, XMLHttpRequest) {
1448
+
1449
+ jQuery("#<?php echo $class_name;?>-upgradeMsg").hide();
1450
+
1451
+ },
1452
+ error: function (MLHttpRequest, textStatus, errorThrown) {
1453
+ alert(errorThrown);
1454
+ }
1455
+ });
1456
+ });
1457
+
1458
+ });
1459
+ </script>
1460
+
1461
+ <?php
1462
+ }
1463
+ }
1464
+
1465
+ $path = plugin_basename(__FILE__);
1466
+ add_action("after_plugin_row_{$path}", 'WPSR_after_plugin_row', 10, 3);
1467
+ // creating Ajax call for WordPress
1468
+ add_action('wp_ajax_nopriv_WPSR_HideMessageAjaxFunction', 'WPSR_HideMessageAjaxFunction');
1469
+ add_action('wp_ajax_WPSR_HideMessageAjaxFunction', 'WPSR_HideMessageAjaxFunction');
1470
+ //---------------------------------------------------------------
1471
+
1472
+ ?>