Version Description
- Bug fixing (solving security issues) - part 2
Download this release
Release Info
Developer | fakhris |
Plugin | SEO Redirection Plugin |
Version | 7.2 |
Comparing to | |
See all releases |
Code changes from version 7.1 to 7.2
- cf/lib/forms/cf.dropdownlist.class.php +1 -1
- common/controls/cf_dropdown.php +26 -11
- common/controls/cf_tab.php +2 -2
- common/controls/datagrid.class.php +2 -2
- common/controls/pagination.class.php +2 -2
- common/util.php +1 -1
- custom/functions.php +4 -4
- options/option_export_import.php +16 -17
- options/option_page_404.php +4 -4
- options/option_page_custome_redirection_add_update.php +2 -2
- options/option_page_custome_redirection_list.php +6 -6
- options/option_page_history.php +3 -3
- options/option_page_post_redirection_list.php +5 -5
- readme.txt +6 -1
- seo-redirection.php +26 -26
cf/lib/forms/cf.dropdownlist.class.php
CHANGED
@@ -76,7 +76,7 @@ class dropdown_list{
|
|
76 |
|
77 |
public function select($str)
|
78 |
{
|
79 |
-
echo "<script>document.getElementById('" . $this->name . "').value='"
|
80 |
}
|
81 |
|
82 |
public function select_array_option($array,$key)
|
76 |
|
77 |
public function select($str)
|
78 |
{
|
79 |
+
echo "<script>document.getElementById('" . esc_js($this->name) . "').value='".esc_html($str)."'</script>";
|
80 |
}
|
81 |
|
82 |
public function select_array_option($array,$key)
|
common/controls/cf_dropdown.php
CHANGED
@@ -36,7 +36,7 @@ if(!class_exists('dropdown')){
|
|
36 |
class dropdown{
|
37 |
|
38 |
var $name='drop';
|
39 |
-
var $options=
|
40 |
var $class='';
|
41 |
var $onchange='';
|
42 |
|
@@ -54,21 +54,36 @@ function __construct($str,$class='',$onchange='')
|
|
54 |
|
55 |
function add($name,$value)
|
56 |
{
|
57 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
}
|
59 |
|
60 |
-
function dropdown_print()
|
61 |
{
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
|
68 |
-
|
|
|
|
|
69 |
{
|
70 |
-
|
71 |
-
|
|
|
72 |
}
|
73 |
|
74 |
function data_bind($tbl,$name="name",$id="id",$where="",$order="",$limit="")
|
36 |
class dropdown{
|
37 |
|
38 |
var $name='drop';
|
39 |
+
var $options= array();
|
40 |
var $class='';
|
41 |
var $onchange='';
|
42 |
|
54 |
|
55 |
function add($name,$value)
|
56 |
{
|
57 |
+
//$this->options=$this->options. "<option value='$value'>$name</option>";
|
58 |
+
|
59 |
+
$this->options[] = array(
|
60 |
+
'key'=>esc_html($value),
|
61 |
+
'name'=>esc_html($name)
|
62 |
+
);
|
63 |
+
|
64 |
}
|
65 |
|
66 |
+
public function dropdown_print()
|
67 |
{
|
68 |
+
?>
|
69 |
+
<select size='1' name='<?php esc_attr_e($this->name);?>' <?php if($this->onchange != ''){?> onchange='<?php echo $this->onchange;?>' <?php } ?> id='<?php esc_attr_e($this->name);?>'>
|
70 |
+
<?php
|
71 |
+
foreach($this->options as $options){
|
72 |
+
?>
|
73 |
+
<option value="<?php esc_html_e($options['key']);?>"><?php esc_html_e($options['name']);?></option>
|
74 |
+
<?php
|
75 |
+
}
|
76 |
+
?>
|
77 |
+
</select>
|
78 |
+
<?php
|
79 |
|
80 |
+
}
|
81 |
+
|
82 |
+
public function select($str)
|
83 |
{
|
84 |
+
?>
|
85 |
+
<script>document.getElementById('<?php echo esc_js($this->name);?>').value='<?php echo esc_js($str);?>'</script>
|
86 |
+
<?php
|
87 |
}
|
88 |
|
89 |
function data_bind($tbl,$name="name",$id="id",$where="",$order="",$limit="")
|
common/controls/cf_tab.php
CHANGED
@@ -71,10 +71,10 @@ var $ignore_parameters='';
|
|
71 |
if(is_array($this->ignore_parameters))
|
72 |
{
|
73 |
$ignore=array_merge(array($this->parameter),$this->ignore_parameters);
|
74 |
-
$options_path= $util->
|
75 |
}else
|
76 |
{
|
77 |
-
$options_path= $util->
|
78 |
}
|
79 |
|
80 |
|
71 |
if(is_array($this->ignore_parameters))
|
72 |
{
|
73 |
$ignore=array_merge(array($this->parameter),$this->ignore_parameters);
|
74 |
+
$options_path= $util->WPSR_get_current_parameters($ignore);
|
75 |
}else
|
76 |
{
|
77 |
+
$options_path= $util->WPSR_get_current_parameters($this->parameter);
|
78 |
}
|
79 |
|
80 |
|
common/controls/datagrid.class.php
CHANGED
@@ -555,7 +555,7 @@ class datagrid
|
|
555 |
if(array_key_exists('rows',$handler))
|
556 |
$trattr=$this->get_attrs($handler['rows']);
|
557 |
|
558 |
-
echo '<tr'. $trattr .'>';
|
559 |
for($i=0;$i<$col_limit;$i++)
|
560 |
{
|
561 |
|
@@ -567,7 +567,7 @@ class datagrid
|
|
567 |
$tdattr='';
|
568 |
|
569 |
|
570 |
-
echo '<td' . $tdattr . '>' . $row[$i] . '</td>';
|
571 |
}
|
572 |
echo '</tr>';
|
573 |
|
555 |
if(array_key_exists('rows',$handler))
|
556 |
$trattr=$this->get_attrs($handler['rows']);
|
557 |
|
558 |
+
echo '<tr'. esc_attr($trattr) .'>';
|
559 |
for($i=0;$i<$col_limit;$i++)
|
560 |
{
|
561 |
|
567 |
$tdattr='';
|
568 |
|
569 |
|
570 |
+
echo '<td' . esc_attr($tdattr) . '>' . $row[$i] . '</td>';
|
571 |
}
|
572 |
echo '</tr>';
|
573 |
|
common/controls/pagination.class.php
CHANGED
@@ -92,7 +92,7 @@ global $wpdb;
|
|
92 |
else if($this->current_page > $this->pages_count)
|
93 |
$this->current_page=$this->pages_count;
|
94 |
|
95 |
-
$this->current_parameters = $this->
|
96 |
$this->prev_page= $this->current_page -1;
|
97 |
$this->next_page= $this->current_page +1;
|
98 |
|
@@ -321,7 +321,7 @@ private function get_page_url_parameter()
|
|
321 |
|
322 |
//------------------------------------------------------------------------
|
323 |
|
324 |
-
private function
|
325 |
{
|
326 |
|
327 |
if($_SERVER['QUERY_STRING']!='')
|
92 |
else if($this->current_page > $this->pages_count)
|
93 |
$this->current_page=$this->pages_count;
|
94 |
|
95 |
+
$this->current_parameters = $this->WPSR_get_current_parameters($this->parameter);
|
96 |
$this->prev_page= $this->current_page -1;
|
97 |
$this->next_page= $this->current_page +1;
|
98 |
|
321 |
|
322 |
//------------------------------------------------------------------------
|
323 |
|
324 |
+
private function WPSR_get_current_parameters($remove_parameter="")
|
325 |
{
|
326 |
|
327 |
if($_SERVER['QUERY_STRING']!='')
|
common/util.php
CHANGED
@@ -286,7 +286,7 @@ public function delete_my_options()
|
|
286 |
}
|
287 |
//----------------------------------------------------
|
288 |
|
289 |
-
public function
|
290 |
{
|
291 |
|
292 |
if($_SERVER['QUERY_STRING']!='')
|
286 |
}
|
287 |
//----------------------------------------------------
|
288 |
|
289 |
+
public function WPSR_get_current_parameters($remove_parameter="")
|
290 |
{
|
291 |
|
292 |
if($_SERVER['QUERY_STRING']!='')
|
custom/functions.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
// custom functions
|
3 |
-
if(!function_exists("
|
4 |
-
function
|
5 |
{
|
6 |
if(substr($url,0,1)=='/')
|
7 |
{
|
@@ -114,8 +114,8 @@ function c_optimize_tables()
|
|
114 |
|
115 |
//------------------------------------------------------------
|
116 |
|
117 |
-
if(!function_exists("
|
118 |
-
function
|
119 |
{
|
120 |
global $wpdb,$table_prefix;
|
121 |
$table_name = $table_prefix . 'WP_SEO_404_links';
|
1 |
<?php
|
2 |
// custom functions
|
3 |
+
if(!function_exists("WPSR_make_absolute_url")) {
|
4 |
+
function WPSR_make_absolute_url($url)
|
5 |
{
|
6 |
if(substr($url,0,1)=='/')
|
7 |
{
|
114 |
|
115 |
//------------------------------------------------------------
|
116 |
|
117 |
+
if(!function_exists("WPSR_Get_total_404")){
|
118 |
+
function WPSR_Get_total_404()
|
119 |
{
|
120 |
global $wpdb,$table_prefix;
|
121 |
$table_name = $table_prefix . 'WP_SEO_404_links';
|
options/option_export_import.php
CHANGED
@@ -8,7 +8,7 @@ require_once WPSR_PATH . "cf/lib/forms/cf.bcheckbox_option.class.php";
|
|
8 |
$SR_jforms = new jforms();
|
9 |
$SR_redirect_cache = new clogica_SR_redirect_cache();
|
10 |
|
11 |
-
function
|
12 |
if ($_SERVER['QUERY_STRING'] != '') {
|
13 |
$qry = '?' . urldecode($_SERVER['QUERY_STRING']);
|
14 |
if (is_array($remove_parameter)) {
|
@@ -38,7 +38,7 @@ function get_current_parameters($remove_parameter = "") {
|
|
38 |
}
|
39 |
}
|
40 |
|
41 |
-
function
|
42 |
$css = $type;
|
43 |
$icon = "";
|
44 |
if ($type == 'updated' || $type == 'success') {
|
@@ -49,10 +49,10 @@ function echo_message($msgtxt, $type = 'success') {
|
|
49 |
$icon = "<span class=\"glyphicon glyphicon-warning-sign\"></span>";
|
50 |
}
|
51 |
|
52 |
-
echo '<div class="alert alert-' . $css . '" role="alert">' . $icon . ' ' . $msgtxt . '</div>';
|
53 |
}
|
54 |
|
55 |
-
function
|
56 |
$arrResult = array();
|
57 |
$handle = fopen($file_name, "r");
|
58 |
if ($handle) {
|
@@ -64,13 +64,13 @@ function csv_arr($file_name) {
|
|
64 |
return $arrResult;
|
65 |
}
|
66 |
|
67 |
-
function
|
68 |
$existing_mimes['csv'] = 'application/octet-stream'; //allow CSV files
|
69 |
return $existing_mimes;
|
70 |
}
|
71 |
|
72 |
if ( isset($_POST['btn_import']) && $_POST['btn_import'] != '') {
|
73 |
-
add_filter('upload_mimes', '
|
74 |
|
75 |
if (array_key_exists('import_file', $_FILES) && $_FILES['import_file']['name'] != '') {
|
76 |
$filename = sanitize_text_field($_FILES['import_file']['name']);
|
@@ -86,8 +86,8 @@ if ( isset($_POST['btn_import']) && $_POST['btn_import'] != '') {
|
|
86 |
if ($movefile && !isset($movefile['error'])) {
|
87 |
|
88 |
|
89 |
-
|
90 |
-
$results =
|
91 |
|
92 |
// start add to database ----------------------------------
|
93 |
|
@@ -187,22 +187,22 @@ if ( isset($_POST['btn_import']) && $_POST['btn_import'] != '') {
|
|
187 |
$report = $report . 'skipped!';
|
188 |
}
|
189 |
|
190 |
-
|
191 |
|
192 |
// end the entrance to database ---------------------------
|
193 |
|
194 |
|
195 |
unlink($movefile['file']);
|
196 |
-
|
197 |
$SR_redirect_cache->free_cache();
|
198 |
} else {
|
199 |
echo $movefile['error'];
|
200 |
}
|
201 |
} else {
|
202 |
-
|
203 |
}
|
204 |
} else {
|
205 |
-
|
206 |
}
|
207 |
}
|
208 |
?>
|
@@ -211,7 +211,7 @@ if ( isset($_POST['btn_import']) && $_POST['btn_import'] != '') {
|
|
211 |
|
212 |
<h3><?php _e("Import Redirects", 'wsr'); ?></h3><hr/>
|
213 |
|
214 |
-
<form id="import" name="import" enctype='multipart/form-data' action="<?php echo
|
215 |
|
216 |
<table cellpadding="10">
|
217 |
<tr>
|
@@ -261,7 +261,7 @@ if ( isset($_POST['btn_import']) && $_POST['btn_import'] != '') {
|
|
261 |
</div>
|
262 |
</div>
|
263 |
<br/>
|
264 |
-
<h3><a target="_blank" href="<?php echo
|
265 |
<div style="text-align: right"><?php _e("* Need Help?", 'wsr'); ?> <a target="_blank" href="http://www.clogica.com/kb/topics/seo-redirection-premium/export-import"><?php _e("click here to see info about import and export", "wsr"); ?></a></div>
|
266 |
<br/>
|
267 |
</form>
|
@@ -277,7 +277,7 @@ foreach ( $plugins as $plugin )
|
|
277 |
{
|
278 |
$found = true;
|
279 |
//$total = $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->prefix}redirection_items" );
|
280 |
-
$total =
|
281 |
if($total > 0){
|
282 |
?>
|
283 |
<h3><?php _e("Import redirects from the redirection plugin", 'wsr') ?></h3><hr/>
|
@@ -289,5 +289,4 @@ foreach ( $plugins as $plugin )
|
|
289 |
break;
|
290 |
}
|
291 |
|
292 |
-
}
|
293 |
-
|
8 |
$SR_jforms = new jforms();
|
9 |
$SR_redirect_cache = new clogica_SR_redirect_cache();
|
10 |
|
11 |
+
function WPSR_get_current_parameters($remove_parameter = "") {
|
12 |
if ($_SERVER['QUERY_STRING'] != '') {
|
13 |
$qry = '?' . urldecode($_SERVER['QUERY_STRING']);
|
14 |
if (is_array($remove_parameter)) {
|
38 |
}
|
39 |
}
|
40 |
|
41 |
+
function WPSR_echo_message($msgtxt, $type = 'success') {
|
42 |
$css = $type;
|
43 |
$icon = "";
|
44 |
if ($type == 'updated' || $type == 'success') {
|
49 |
$icon = "<span class=\"glyphicon glyphicon-warning-sign\"></span>";
|
50 |
}
|
51 |
|
52 |
+
echo '<div class="alert alert-' . esc_attr($css) . '" role="alert">' . $icon . ' ' . esc_html($msgtxt) . '</div>';
|
53 |
}
|
54 |
|
55 |
+
function WPSR_csv_arr($file_name) {
|
56 |
$arrResult = array();
|
57 |
$handle = fopen($file_name, "r");
|
58 |
if ($handle) {
|
64 |
return $arrResult;
|
65 |
}
|
66 |
|
67 |
+
function WPSR_add_csv_mime_upload_mimes($existing_mimes) {
|
68 |
$existing_mimes['csv'] = 'application/octet-stream'; //allow CSV files
|
69 |
return $existing_mimes;
|
70 |
}
|
71 |
|
72 |
if ( isset($_POST['btn_import']) && $_POST['btn_import'] != '') {
|
73 |
+
add_filter('upload_mimes', 'WPSR_add_csv_mime_upload_mimes');
|
74 |
|
75 |
if (array_key_exists('import_file', $_FILES) && $_FILES['import_file']['name'] != '') {
|
76 |
$filename = sanitize_text_field($_FILES['import_file']['name']);
|
86 |
if ($movefile && !isset($movefile['error'])) {
|
87 |
|
88 |
|
89 |
+
WPSR_echo_message(__("File is valid, and was successfully uploaded.", 'wsr'));
|
90 |
+
$results = WPSR_csv_arr($movefile['file']);
|
91 |
|
92 |
// start add to database ----------------------------------
|
93 |
|
187 |
$report = $report . 'skipped!';
|
188 |
}
|
189 |
|
190 |
+
WPSR_echo_message($report);
|
191 |
|
192 |
// end the entrance to database ---------------------------
|
193 |
|
194 |
|
195 |
unlink($movefile['file']);
|
196 |
+
WPSR_echo_message(__("File is deleted!", 'wsr'));
|
197 |
$SR_redirect_cache->free_cache();
|
198 |
} else {
|
199 |
echo $movefile['error'];
|
200 |
}
|
201 |
} else {
|
202 |
+
WPSR_echo_message(__("Please choose a CSV file", 'wsr'), 'danger');
|
203 |
}
|
204 |
} else {
|
205 |
+
WPSR_echo_message(__("You need to select a file to upload it!", 'wsr'), 'danger');
|
206 |
}
|
207 |
}
|
208 |
?>
|
211 |
|
212 |
<h3><?php _e("Import Redirects", 'wsr'); ?></h3><hr/>
|
213 |
|
214 |
+
<form id="import" name="import" enctype='multipart/form-data' action="<?php echo WPSR_get_current_parameters(array("add", "edit", "del")); ?>" method="post" class="form-horizontal" role="form" data-toggle="validator">
|
215 |
|
216 |
<table cellpadding="10">
|
217 |
<tr>
|
261 |
</div>
|
262 |
</div>
|
263 |
<br/>
|
264 |
+
<h3><a target="_blank" href="<?php echo WPSR_URL . 'custom/export/sample.csv' ?>">Sample Csv File</a></h3>
|
265 |
<div style="text-align: right"><?php _e("* Need Help?", 'wsr'); ?> <a target="_blank" href="http://www.clogica.com/kb/topics/seo-redirection-premium/export-import"><?php _e("click here to see info about import and export", "wsr"); ?></a></div>
|
266 |
<br/>
|
267 |
</form>
|
277 |
{
|
278 |
$found = true;
|
279 |
//$total = $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->prefix}redirection_items" );
|
280 |
+
$total = WPSR_getRedirectCount();
|
281 |
if($total > 0){
|
282 |
?>
|
283 |
<h3><?php _e("Import redirects from the redirection plugin", 'wsr') ?></h3><hr/>
|
289 |
break;
|
290 |
}
|
291 |
|
292 |
+
}
|
|
options/option_page_404.php
CHANGED
@@ -51,7 +51,7 @@ if($util->get_option_value('p404_discovery_status')!='1')
|
|
51 |
function go_search(){
|
52 |
var sword = document.getElementById('search').value;
|
53 |
if(sword!=''){
|
54 |
-
var link = "<?php echo $util->
|
55 |
window.location = link ;
|
56 |
}else
|
57 |
{
|
@@ -64,7 +64,7 @@ var sword = document.getElementById('search').value;
|
|
64 |
function go_del(){
|
65 |
|
66 |
if (confirm('Are you sure you want to delete all 404 links?')) {
|
67 |
-
window.location = "<?php echo $util->
|
68 |
}
|
69 |
}
|
70 |
|
@@ -79,7 +79,7 @@ function go_del(){
|
|
79 |
<td align="left">
|
80 |
<input onkeyup="if (event.keyCode == 13) go_search();" style="height: 30px;" id="search" type="text" name="search" value="<?php echo htmlentities($util->get('search'))?>" size="40">
|
81 |
<a onclick="go_search()" href="#"><div class="search_link">Search</div></a>
|
82 |
-
<a href="<?php echo $util->
|
83 |
</td>
|
84 |
<td align="right">
|
85 |
<select data-size="5" class="selectpicker" name="del_404_option" id="del_404_option">
|
@@ -127,7 +127,7 @@ function go_del(){
|
|
127 |
|
128 |
|
129 |
|
130 |
-
$grid->add_php_col(' echo " <a target=\'_blank\' href=\'" .
|
131 |
$grid->add_data_col('ctime','Discovered');
|
132 |
|
133 |
if($util->get_option_value('ip_logging_status') == 0)
|
51 |
function go_search(){
|
52 |
var sword = document.getElementById('search').value;
|
53 |
if(sword!=''){
|
54 |
+
var link = "<?php echo $util->WPSR_get_current_parameters(array('del','search','page_num','add','edit'));?>&search=" + sword;
|
55 |
window.location = link ;
|
56 |
}else
|
57 |
{
|
64 |
function go_del(){
|
65 |
|
66 |
if (confirm('Are you sure you want to delete all 404 links?')) {
|
67 |
+
window.location = "<?php echo $util->WPSR_get_current_parameters(array('del','search','page_num','add','edit'));?>&do_404_del=" + document.getElementById('del_404_option').value;
|
68 |
}
|
69 |
}
|
70 |
|
79 |
<td align="left">
|
80 |
<input onkeyup="if (event.keyCode == 13) go_search();" style="height: 30px;" id="search" type="text" name="search" value="<?php echo htmlentities($util->get('search'))?>" size="40">
|
81 |
<a onclick="go_search()" href="#"><div class="search_link">Search</div></a>
|
82 |
+
<a href="<?php echo $util->WPSR_get_current_parameters('search')?>"><div class="see_link">Show All</div></a>
|
83 |
</td>
|
84 |
<td align="right">
|
85 |
<select data-size="5" class="selectpicker" name="del_404_option" id="del_404_option">
|
127 |
|
128 |
|
129 |
|
130 |
+
$grid->add_php_col(' echo " <a target=\'_blank\' href=\'" . WPSR_make_absolute_url($db_link) ."\'> {$db_link}</a>" ;','Link');
|
131 |
$grid->add_data_col('ctime','Discovered');
|
132 |
|
133 |
if($util->get_option_value('ip_logging_status') == 0)
|
options/option_page_custome_redirection_add_update.php
CHANGED
@@ -52,7 +52,7 @@ if($util->get('page404')!='')
|
|
52 |
}
|
53 |
|
54 |
?>
|
55 |
-
<form onsubmit="return check_from();" method="POST" id="myform" accept-charset="UTF-8" action="<?php echo $util->
|
56 |
<table class="cform" width="100%">
|
57 |
<tr>
|
58 |
<td class="label"><?php _e('Redirection status:','wsr') ?></td>
|
@@ -252,7 +252,7 @@ else if($util->get('edit')!='')
|
|
252 |
echo '<input class="button-primary" type="submit" value="'.__("Update","wsr").'" name="edit_exist">';
|
253 |
|
254 |
?>
|
255 |
-
<input onclick="window.location='<?php echo $util->
|
256 |
<br/></form>
|
257 |
|
258 |
<script>
|
52 |
}
|
53 |
|
54 |
?>
|
55 |
+
<form onsubmit="return check_from();" method="POST" id="myform" accept-charset="UTF-8" action="<?php echo $util->WPSR_get_current_parameters(array('add','edit','page404'));?>">
|
56 |
<table class="cform" width="100%">
|
57 |
<tr>
|
58 |
<td class="label"><?php _e('Redirection status:','wsr') ?></td>
|
252 |
echo '<input class="button-primary" type="submit" value="'.__("Update","wsr").'" name="edit_exist">';
|
253 |
|
254 |
?>
|
255 |
+
<input onclick="window.location='<?php echo $util->WPSR_get_current_parameters(array('add','edit'));?>';" class="button-primary" type="button" value="<?php _e("Cancel",'wsr') ?>" name="cancel">
|
256 |
<br/></form>
|
257 |
|
258 |
<script>
|
options/option_page_custome_redirection_list.php
CHANGED
@@ -15,7 +15,7 @@ if ($util->get('del') != '') {
|
|
15 |
$SR_redirect_cache->free_cache();
|
16 |
}
|
17 |
|
18 |
-
$rlink = $util->
|
19 |
|
20 |
$redirect_from = isset($redirect_from) ? $redirect_from : '';
|
21 |
$redirect_to = isset($redirect_to) ? $redirect_to : '';
|
@@ -96,7 +96,7 @@ isset($_REQUEST['tab']) ? $url_op = $_REQUEST['tab'] : $url_op = "";
|
|
96 |
</div>
|
97 |
<div class="modal-body">
|
98 |
|
99 |
-
<form onsubmit="return check_from();" method="POST" id="myform" action="<?php echo $util->
|
100 |
<table class="cform" width="100%">
|
101 |
<tr>
|
102 |
<td class="label"><?php _e('Redirect status:', 'wsr') ?></td>
|
@@ -227,7 +227,7 @@ if ($util->get('page404') != '')
|
|
227 |
<input onkeyup="if (event.keyCode == 13)
|
228 |
go_search();" style="height: 30px;" id="search" type="text" name="search" value="<?php echo htmlentities($util->get('search'), ENT_QUOTES) ?>" size="30">
|
229 |
<a class="button" onclick="go_search()" href="#" ><span style="padding-top: 3px;" class="dashicons dashicons-search"></span> <?php _e("Search", 'wsr') ?></a>
|
230 |
-
<a class="button" href="<?php echo esc_url(htmlentities($util->
|
231 |
</td>
|
232 |
</tr>
|
233 |
</table>
|
@@ -297,8 +297,8 @@ if ($util->get('search') != '') {
|
|
297 |
}
|
298 |
|
299 |
$grid->add_php_col(' echo "<input type=\'checkbox\' class=\'chkthis\' name=\'redirect_id[]\' value=\'{$db_ID}\' />";',"<input type='checkbox' class='chkall' name='check_all' />");
|
300 |
-
$grid->add_php_col(' echo "<div class=\'{$db_redirect_from_type}_background_{$db_enabled}\'><a target=\'_blank\' href=\'" .
|
301 |
-
$grid->add_php_col(' echo "<div class=\'{$db_redirect_to_type}_background_{$db_enabled}\'><a target=\'_blank\' href=\'" .
|
302 |
$grid->add_data_col('redirect_type', __('Type', 'wsr'));
|
303 |
|
304 |
|
@@ -321,7 +321,7 @@ else
|
|
321 |
$grid->add_data_col('access_date','<a href="'.$url.'&type=dt&sort=asc" class="dt" data-sort="asc">Last Access</a>');
|
322 |
}
|
323 |
|
324 |
-
$grid->add_template_col('del', $util->
|
325 |
$grid->add_template_col('edit', '{db_ID}', __('', 'wsr'));
|
326 |
$grid->run();
|
327 |
?>
|
15 |
$SR_redirect_cache->free_cache();
|
16 |
}
|
17 |
|
18 |
+
$rlink = $util->WPSR_get_current_parameters(array('del', 'search', 'page_num', 'add', 'edit', 'tab'));
|
19 |
|
20 |
$redirect_from = isset($redirect_from) ? $redirect_from : '';
|
21 |
$redirect_to = isset($redirect_to) ? $redirect_to : '';
|
96 |
</div>
|
97 |
<div class="modal-body">
|
98 |
|
99 |
+
<form onsubmit="return check_from();" method="POST" id="myform" action="<?php echo $util->WPSR_get_current_parameters(array('add', 'edit', 'page404')); ?>">
|
100 |
<table class="cform" width="100%">
|
101 |
<tr>
|
102 |
<td class="label"><?php _e('Redirect status:', 'wsr') ?></td>
|
227 |
<input onkeyup="if (event.keyCode == 13)
|
228 |
go_search();" style="height: 30px;" id="search" type="text" name="search" value="<?php echo htmlentities($util->get('search'), ENT_QUOTES) ?>" size="30">
|
229 |
<a class="button" onclick="go_search()" href="#" ><span style="padding-top: 3px;" class="dashicons dashicons-search"></span> <?php _e("Search", 'wsr') ?></a>
|
230 |
+
<a class="button" href="<?php echo esc_url(htmlentities($util->WPSR_get_current_parameters('search'))) ?>"><span style="padding-top: 3px;" class="dashicons dashicons-screenoptions"></span> <?php _e("Show All", 'wsr') ?></a>
|
231 |
</td>
|
232 |
</tr>
|
233 |
</table>
|
297 |
}
|
298 |
|
299 |
$grid->add_php_col(' echo "<input type=\'checkbox\' class=\'chkthis\' name=\'redirect_id[]\' value=\'{$db_ID}\' />";',"<input type='checkbox' class='chkall' name='check_all' />");
|
300 |
+
$grid->add_php_col(' echo "<div class=\'{$db_redirect_from_type}_background_{$db_enabled}\'><a target=\'_blank\' href=\'" . WPSR_make_absolute_url(esc_url($db_redirect_from)) ."\'>{$db_redirect_from}</a></div>" ;', __('Redirect from ', 'wsr'));
|
301 |
+
$grid->add_php_col(' echo "<div class=\'{$db_redirect_to_type}_background_{$db_enabled}\'><a target=\'_blank\' href=\'" . WPSR_make_absolute_url(esc_url($db_redirect_to)) ."\'>{$db_redirect_to}</a></div>"; ', __('Redirect to ', 'wsr'));
|
302 |
$grid->add_data_col('redirect_type', __('Type', 'wsr'));
|
303 |
|
304 |
|
321 |
$grid->add_data_col('access_date','<a href="'.$url.'&type=dt&sort=asc" class="dt" data-sort="asc">Last Access</a>');
|
322 |
}
|
323 |
|
324 |
+
$grid->add_template_col('del', $util->WPSR_get_current_parameters('del') . '&del={db_ID}', __('Actions', 'wsr'));
|
325 |
$grid->add_template_col('edit', '{db_ID}', __('', 'wsr'));
|
326 |
$grid->run();
|
327 |
?>
|
options/option_page_history.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
3 |
global $wpdb,$table_prefix,$util;
|
4 |
$table_name = $table_prefix . 'WP_SEO_Redirection_LOG';
|
5 |
-
$rlink=$util->
|
6 |
|
7 |
if($util->get('del')!=''){
|
8 |
if($util->get('del')=='all'){
|
@@ -42,7 +42,7 @@ var sword = document.getElementById('search').value;
|
|
42 |
<td align="right">
|
43 |
<input onkeyup="if (event.keyCode == 13) go_search();" style="height: 30px;" id="search" type="text" name="search" value="<?php echo htmlentities($util->get('search'),ENT_QUOTES)?>" size="30">
|
44 |
<a onclick="go_search()" href="#" class="button"><span style="padding-top: 3px;" class="dashicons dashicons-search"></span> <?php _e("Search","wsr"); ?></a>
|
45 |
-
<a href="<?php echo $util->
|
46 |
</td>
|
47 |
</tr>
|
48 |
</table>
|
@@ -97,7 +97,7 @@ var sword = document.getElementById('search').value;
|
|
97 |
|
98 |
$grid->add_php_col('echo date(\'Y-n-j\',strtotime($db_ctime)) . \'<br/>\' . date(\'H:i:s\',strtotime($db_ctime)); ',__('Time','wsr'));
|
99 |
|
100 |
-
$grid->add_php_col(' echo "<div class=\'arrow_from\'><a target=\'_blank\' href=\'" .
|
101 |
$grid->add_data_col('rtype','Type');
|
102 |
$grid->add_php_col('if($db_referrer !="") echo "<a target=\'_blank\' title=\'$db_referrer\' href=\'$db_referrer\'><span class=\'link\'></span></a>" ;',__('Ref','wsr'));
|
103 |
|
2 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
3 |
global $wpdb,$table_prefix,$util;
|
4 |
$table_name = $table_prefix . 'WP_SEO_Redirection_LOG';
|
5 |
+
$rlink=$util->WPSR_get_current_parameters(array('del','search','page_num','add','edit'));
|
6 |
|
7 |
if($util->get('del')!=''){
|
8 |
if($util->get('del')=='all'){
|
42 |
<td align="right">
|
43 |
<input onkeyup="if (event.keyCode == 13) go_search();" style="height: 30px;" id="search" type="text" name="search" value="<?php echo htmlentities($util->get('search'),ENT_QUOTES)?>" size="30">
|
44 |
<a onclick="go_search()" href="#" class="button"><span style="padding-top: 3px;" class="dashicons dashicons-search"></span> <?php _e("Search","wsr"); ?></a>
|
45 |
+
<a href="<?php echo $util->WPSR_get_current_parameters('search')?>" class="button"><span style="padding-top: 3px;" class="dashicons dashicons-screenoptions"></span> <?php _e("Show All","wsr"); ?></a>
|
46 |
</td>
|
47 |
</tr>
|
48 |
</table>
|
97 |
|
98 |
$grid->add_php_col('echo date(\'Y-n-j\',strtotime($db_ctime)) . \'<br/>\' . date(\'H:i:s\',strtotime($db_ctime)); ',__('Time','wsr'));
|
99 |
|
100 |
+
$grid->add_php_col(' echo "<div class=\'arrow_from\'><a target=\'_blank\' href=\'" . WPSR_make_absolute_url(esc_url($db_rfrom)) ."\'>" .SR_cut_string(esc_url($db_rfrom),0,120) ."</a></div><div class=\'arrow_to\'><a target=\'_blank\' href=\'" . WPSR_make_absolute_url(esc_url($db_rto)) ."\'>" .SR_cut_string(esc_url($db_rto),0,120) ."</a></div>" ;',__('Redirection','wsr'));
|
101 |
$grid->add_data_col('rtype','Type');
|
102 |
$grid->add_php_col('if($db_referrer !="") echo "<a target=\'_blank\' title=\'$db_referrer\' href=\'$db_referrer\'><span class=\'link\'></span></a>" ;',__('Ref','wsr'));
|
103 |
|
options/option_page_post_redirection_list.php
CHANGED
@@ -17,7 +17,7 @@ $table_name = $table_prefix . 'WP_SEO_Redirection';
|
|
17 |
$SR_redirect_cache->free_cache();
|
18 |
}
|
19 |
|
20 |
-
$rlink=$util->
|
21 |
|
22 |
?>
|
23 |
<br/>
|
@@ -56,7 +56,7 @@ var sword = document.getElementById('search').value;
|
|
56 |
<!--<a onclick="go_search()" href="#"><div class="search_link"><?php _e("Search","wsr"); ?></div></a>-->
|
57 |
<a onclick="go_search()" href="#" class="button"><span style="padding-top: 3px;" class="dashicons dashicons-search"></span> <?php _e("Search","wsr"); ?></a>
|
58 |
|
59 |
-
<a href="<?php echo esc_url($util->
|
60 |
</td>
|
61 |
</tr>
|
62 |
</table>
|
@@ -102,13 +102,13 @@ var sword = document.getElementById('search').value;
|
|
102 |
|
103 |
//$grid->add_data_col('redirect_from','Redirect from');
|
104 |
//$grid->add_data_col('redirect_to','Redirect to');
|
105 |
-
$grid->add_php_col(' echo "<div class=\'{$db_redirect_from_type}_background_{$db_enabled}\'><a target=\'_blank\' href=\'" .
|
106 |
-
$grid->add_php_col(' echo "<div class=\'{$db_redirect_to_type}_background_{$db_enabled}\'><a target=\'_blank\' href=\'" .
|
107 |
$grid->add_data_col('redirect_type',__('Type','wsr'));
|
108 |
$grid->add_data_col('hits',__('Hits','wsr'));
|
109 |
$grid->add_data_col('access_date',__('Last Access','wsr'));
|
110 |
$grid->add_template_col('go_link','post.php?post={db_postID}&action=edit','Actions');
|
111 |
-
$grid->add_template_col('del', $util->
|
112 |
|
113 |
$grid->run();
|
114 |
|
17 |
$SR_redirect_cache->free_cache();
|
18 |
}
|
19 |
|
20 |
+
$rlink=$util->WPSR_get_current_parameters(array('del','search','page_num','add','edit','tab'));
|
21 |
|
22 |
?>
|
23 |
<br/>
|
56 |
<!--<a onclick="go_search()" href="#"><div class="search_link"><?php _e("Search","wsr"); ?></div></a>-->
|
57 |
<a onclick="go_search()" href="#" class="button"><span style="padding-top: 3px;" class="dashicons dashicons-search"></span> <?php _e("Search","wsr"); ?></a>
|
58 |
|
59 |
+
<a href="<?php echo esc_url($util->WPSR_get_current_parameters('search'))?>" class="button"><span style="padding-top: 3px;" class="dashicons dashicons-screenoptions"></span> <?php _e("Show All","wsr"); ?></a>
|
60 |
</td>
|
61 |
</tr>
|
62 |
</table>
|
102 |
|
103 |
//$grid->add_data_col('redirect_from','Redirect from');
|
104 |
//$grid->add_data_col('redirect_to','Redirect to');
|
105 |
+
$grid->add_php_col(' echo "<div class=\'{$db_redirect_from_type}_background_{$db_enabled}\'><a target=\'_blank\' href=\'" . WPSR_make_absolute_url($db_redirect_from) ."\'>{$db_redirect_from}</a></div>" ;',__('Redirect from ','wsr'));
|
106 |
+
$grid->add_php_col(' echo "<div class=\'{$db_redirect_to_type}_background_{$db_enabled}\'><a target=\'_blank\' href=\'" . WPSR_make_absolute_url($db_redirect_to) ."\'>{$db_redirect_to}</a></div>"; ',__('Redirect to ','wsr'));
|
107 |
$grid->add_data_col('redirect_type',__('Type','wsr'));
|
108 |
$grid->add_data_col('hits',__('Hits','wsr'));
|
109 |
$grid->add_data_col('access_date',__('Last Access','wsr'));
|
110 |
$grid->add_template_col('go_link','post.php?post={db_postID}&action=edit','Actions');
|
111 |
+
$grid->add_template_col('del', $util->WPSR_get_current_parameters('del') . '&del={db_ID}','');
|
112 |
|
113 |
$grid->run();
|
114 |
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.clogica.com/donations.htm
|
|
4 |
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
|
5 |
Requires at least: 4.1
|
6 |
Tested up to: 5.8
|
7 |
-
Stable tag: 7.
|
8 |
|
9 |
SEO Redirection is a powerful redirect manager to manage 301 redirects without requiring knowledge of Apache .htaccess files.
|
10 |
|
@@ -75,10 +75,15 @@ Yes, here is the plugin full knowledge base http://www.clogica.com/kb/
|
|
75 |
== Upgrade Notice ==
|
76 |
|
77 |
|
|
|
|
|
|
|
|
|
78 |
= 7.1 =
|
79 |
* Bug fixing (solving security issues)
|
80 |
|
81 |
|
|
|
82 |
= 6.4 =
|
83 |
* Bugs fixed
|
84 |
|
4 |
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
|
5 |
Requires at least: 4.1
|
6 |
Tested up to: 5.8
|
7 |
+
Stable tag: 7.2
|
8 |
|
9 |
SEO Redirection is a powerful redirect manager to manage 301 redirects without requiring knowledge of Apache .htaccess files.
|
10 |
|
75 |
== Upgrade Notice ==
|
76 |
|
77 |
|
78 |
+
= 7.2 =
|
79 |
+
* Bug fixing (solving security issues) - part 2
|
80 |
+
|
81 |
+
|
82 |
= 7.1 =
|
83 |
* Bug fixing (solving security issues)
|
84 |
|
85 |
|
86 |
+
|
87 |
= 6.4 =
|
88 |
* Bugs fixed
|
89 |
|
seo-redirection.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: SEO Redirection
|
|
4 |
Plugin URI: http://www.clogica.com/product/seo-redirection-premium-wordpress-plugin
|
5 |
Description: By this plugin you can manage all your website redirection types easily.
|
6 |
Author: Fakhri Alsadi
|
7 |
-
Version: 7.
|
8 |
Author URI: http://www.clogica.com
|
9 |
Text Domain: wsr
|
10 |
*/
|
@@ -15,7 +15,7 @@ require_once('custom/controls/cf.SR_redirect_cache.class.php');
|
|
15 |
|
16 |
define('WPSR_PATH', plugin_dir_path(__FILE__));
|
17 |
|
18 |
-
if (!defined('
|
19 |
|
20 |
|
21 |
if (!defined('WP_SEO_REDIRECTION_OPTIONS')) {
|
@@ -33,7 +33,7 @@ add_action('admin_enqueue_scripts', 'WPSR_header_code');
|
|
33 |
add_action('admin_menu', 'WPSR_admin_menu');
|
34 |
add_action('wp', 'WPSR_redirect', 1);
|
35 |
add_action('save_post', 'WPSR_get_post_redirection');
|
36 |
-
add_action('add_meta_boxes', '
|
37 |
add_action('admin_head', 'WPSR_check_default_permalink');
|
38 |
add_action('plugins_loaded', 'WPSR_upgrade');
|
39 |
|
@@ -43,7 +43,7 @@ register_uninstall_hook(__FILE__, 'WPSR_uninstall');
|
|
43 |
/////////////////////////////////////////////////////////////////////////
|
44 |
|
45 |
|
46 |
-
function
|
47 |
{
|
48 |
global $wpdb;
|
49 |
if (is_multisite()) {
|
@@ -56,10 +56,10 @@ function prism_multiple_plugin_activate_trial()
|
|
56 |
}
|
57 |
}
|
58 |
|
59 |
-
register_activation_hook(__FILE__, '
|
60 |
|
61 |
|
62 |
-
function
|
63 |
{
|
64 |
global $util;
|
65 |
if ($util->get_option_value('show_redirect_box') == '1') {
|
@@ -555,9 +555,9 @@ function WPSR_header_code()
|
|
555 |
|
556 |
//---------------------------------------------------------------
|
557 |
|
558 |
-
add_action("wp_ajax_customAddUpdate", "
|
559 |
|
560 |
-
function
|
561 |
{
|
562 |
global $wpdb, $table_prefix, $util;
|
563 |
$table_name = $table_prefix . 'WP_SEO_Redirection';
|
@@ -734,8 +734,8 @@ function customAddUpdate_callback()
|
|
734 |
die;
|
735 |
}
|
736 |
|
737 |
-
add_action("wp_ajax_customUpdateRec", "
|
738 |
-
function
|
739 |
{
|
740 |
|
741 |
|
@@ -771,8 +771,8 @@ function customUpdateRec_callback()
|
|
771 |
die;
|
772 |
}
|
773 |
|
774 |
-
add_action("wp_ajax_importFromRedirection","
|
775 |
-
function
|
776 |
{
|
777 |
global $wpdb;
|
778 |
|
@@ -900,7 +900,7 @@ function WPSR_options_menu()
|
|
900 |
} else if ($util->get_option_value('plugin_status') == '2') {
|
901 |
$util->info_option_msg(__('SEO Redirection is', 'wsr') . ' <b>' . __('disabled for admin', 'wsr') . '</b>' . __(' only, you can go to option tab and enable it!', 'wsr'));
|
902 |
}
|
903 |
-
$total_404_errors = (
|
904 |
|
905 |
|
906 |
echo '<div class="wrap"><h2>' . __("SEO Redirection Free", 'wsr') . '</h2><h4>' . __('Upgrade to', 'wsr') . ' <a target="_blank" onclick="swal.clickConfirm();" href="http://www.clogica.com/product/seo-redirection-premium-wordpress-plugin">' . __("Pro Version", "wsr") . '</a>' . __(" to manage 404 errors and empower your site SEO", "wsr") . ' <strong style="color:yellow; background-color:red; padding:3px;"> ' . __("NOW 50% OFF ", 'wsr') . '</strong></h4>';
|
@@ -1216,7 +1216,7 @@ function WPSR_uninstall()
|
|
1216 |
|
1217 |
//---------------------------------------------------------------
|
1218 |
|
1219 |
-
function
|
1220 |
{
|
1221 |
add_option('nsr_upgrade_message', 'yes');
|
1222 |
}
|
@@ -1251,7 +1251,7 @@ function SR_after_plugin_row($plugin_file, $plugin_data, $status)
|
|
1251 |
type: 'POST',
|
1252 |
url: '<?php echo admin_url();?>/admin-ajax.php',
|
1253 |
data: {
|
1254 |
-
action: '
|
1255 |
},
|
1256 |
success: function (data, textStatus, XMLHttpRequest) {
|
1257 |
|
@@ -1274,14 +1274,14 @@ function SR_after_plugin_row($plugin_file, $plugin_data, $status)
|
|
1274 |
$path = plugin_basename(__FILE__);
|
1275 |
//add_action("after_plugin_row_{$path}", 'SR_after_plugin_row', 10, 3);
|
1276 |
// creating Ajax call for WordPress
|
1277 |
-
//add_action('
|
1278 |
-
//add_action('
|
1279 |
|
1280 |
*/
|
1281 |
//---------------------------------------------------------------
|
1282 |
|
1283 |
/* display import from redirection plugin in admin notice */
|
1284 |
-
function
|
1285 |
global $wpdb;
|
1286 |
global $current_user;
|
1287 |
$plugins = get_option( 'active_plugins', array() );
|
@@ -1295,7 +1295,7 @@ function SR_admin_notice_callback() {
|
|
1295 |
{
|
1296 |
$found = true;
|
1297 |
//$total = $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->prefix}redirection_items");
|
1298 |
-
$total =
|
1299 |
if($total > 0){
|
1300 |
?>
|
1301 |
<div class="notice-success notice is-dismissible sr_notice">
|
@@ -1316,10 +1316,10 @@ function SR_admin_notice_callback() {
|
|
1316 |
}
|
1317 |
}
|
1318 |
}
|
1319 |
-
add_action( 'admin_notices', '
|
1320 |
|
1321 |
-
add_action('admin_footer','
|
1322 |
-
function
|
1323 |
{
|
1324 |
|
1325 |
global $wpdb;
|
@@ -1340,7 +1340,7 @@ function SR_import_popup_in_footer()
|
|
1340 |
|
1341 |
$found = true;
|
1342 |
$total_org = $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->prefix}redirection_items");
|
1343 |
-
$total =
|
1344 |
$SR_import = isset($_GET['SR_import']) ? sanitize_text_field($_GET['SR_import']) : '';
|
1345 |
|
1346 |
|
@@ -1372,8 +1372,8 @@ function SR_import_popup_in_footer()
|
|
1372 |
}
|
1373 |
}
|
1374 |
|
1375 |
-
add_action('wp_ajax_sr_dismiss_notice','
|
1376 |
-
function
|
1377 |
{
|
1378 |
global $current_user;
|
1379 |
$user_id = $current_user->ID;
|
@@ -1381,7 +1381,7 @@ function sr_dismiss_notice_callback()
|
|
1381 |
echo "1";
|
1382 |
exit;
|
1383 |
}
|
1384 |
-
function
|
1385 |
{
|
1386 |
global $wpdb;
|
1387 |
|
4 |
Plugin URI: http://www.clogica.com/product/seo-redirection-premium-wordpress-plugin
|
5 |
Description: By this plugin you can manage all your website redirection types easily.
|
6 |
Author: Fakhri Alsadi
|
7 |
+
Version: 7.2
|
8 |
Author URI: http://www.clogica.com
|
9 |
Text Domain: wsr
|
10 |
*/
|
15 |
|
16 |
define('WPSR_PATH', plugin_dir_path(__FILE__));
|
17 |
|
18 |
+
if (!defined('WPSR_URL')) define('WPSR_URL', plugin_dir_url(__FILE__));
|
19 |
|
20 |
|
21 |
if (!defined('WP_SEO_REDIRECTION_OPTIONS')) {
|
33 |
add_action('admin_menu', 'WPSR_admin_menu');
|
34 |
add_action('wp', 'WPSR_redirect', 1);
|
35 |
add_action('save_post', 'WPSR_get_post_redirection');
|
36 |
+
add_action('add_meta_boxes', 'WPSR_adding_custom_meta_boxes', 10, 3);
|
37 |
add_action('admin_head', 'WPSR_check_default_permalink');
|
38 |
add_action('plugins_loaded', 'WPSR_upgrade');
|
39 |
|
43 |
/////////////////////////////////////////////////////////////////////////
|
44 |
|
45 |
|
46 |
+
function WPSR_multiple_plugin_activate_trial()
|
47 |
{
|
48 |
global $wpdb;
|
49 |
if (is_multisite()) {
|
56 |
}
|
57 |
}
|
58 |
|
59 |
+
register_activation_hook(__FILE__, 'WPSR_multiple_plugin_activate_trial');
|
60 |
|
61 |
|
62 |
+
function WPSR_adding_custom_meta_boxes()
|
63 |
{
|
64 |
global $util;
|
65 |
if ($util->get_option_value('show_redirect_box') == '1') {
|
555 |
|
556 |
//---------------------------------------------------------------
|
557 |
|
558 |
+
add_action("wp_ajax_customAddUpdate", "WPSR_customAddUpdate_callback");
|
559 |
|
560 |
+
function WPSR_customAddUpdate_callback()
|
561 |
{
|
562 |
global $wpdb, $table_prefix, $util;
|
563 |
$table_name = $table_prefix . 'WP_SEO_Redirection';
|
734 |
die;
|
735 |
}
|
736 |
|
737 |
+
add_action("wp_ajax_customUpdateRec", "WPSR_customUpdateRec_callback");
|
738 |
+
function WPSR_customUpdateRec_callback()
|
739 |
{
|
740 |
|
741 |
|
771 |
die;
|
772 |
}
|
773 |
|
774 |
+
add_action("wp_ajax_importFromRedirection","WPSR_importFromRedirection_callback");
|
775 |
+
function WPSR_importFromRedirection_callback()
|
776 |
{
|
777 |
global $wpdb;
|
778 |
|
900 |
} else if ($util->get_option_value('plugin_status') == '2') {
|
901 |
$util->info_option_msg(__('SEO Redirection is', 'wsr') . ' <b>' . __('disabled for admin', 'wsr') . '</b>' . __(' only, you can go to option tab and enable it!', 'wsr'));
|
902 |
}
|
903 |
+
$total_404_errors = (WPSR_Get_total_404() > 10) ? __('You have', 'wsr') . ' <b style="color:red; background-color:yellow; padding:3px;"> too many </b>' . __(' broken link (404 links)', 'wsr') . ', <br>' : '';
|
904 |
|
905 |
|
906 |
echo '<div class="wrap"><h2>' . __("SEO Redirection Free", 'wsr') . '</h2><h4>' . __('Upgrade to', 'wsr') . ' <a target="_blank" onclick="swal.clickConfirm();" href="http://www.clogica.com/product/seo-redirection-premium-wordpress-plugin">' . __("Pro Version", "wsr") . '</a>' . __(" to manage 404 errors and empower your site SEO", "wsr") . ' <strong style="color:yellow; background-color:red; padding:3px;"> ' . __("NOW 50% OFF ", 'wsr') . '</strong></h4>';
|
1216 |
|
1217 |
//---------------------------------------------------------------
|
1218 |
|
1219 |
+
function WPSR_HideMessageAjaxFunction()
|
1220 |
{
|
1221 |
add_option('nsr_upgrade_message', 'yes');
|
1222 |
}
|
1251 |
type: 'POST',
|
1252 |
url: '<?php echo admin_url();?>/admin-ajax.php',
|
1253 |
data: {
|
1254 |
+
action: 'WPSR_HideMessageAjaxFunction'
|
1255 |
},
|
1256 |
success: function (data, textStatus, XMLHttpRequest) {
|
1257 |
|
1274 |
$path = plugin_basename(__FILE__);
|
1275 |
//add_action("after_plugin_row_{$path}", 'SR_after_plugin_row', 10, 3);
|
1276 |
// creating Ajax call for WordPress
|
1277 |
+
//add_action('wp_ajax_nopriv_WPSR_HideMessageAjaxFunction', 'WPSR_HideMessageAjaxFunction');
|
1278 |
+
//add_action('wp_ajax_WPSR_HideMessageAjaxFunction', 'WPSR_HideMessageAjaxFunction');
|
1279 |
|
1280 |
*/
|
1281 |
//---------------------------------------------------------------
|
1282 |
|
1283 |
/* display import from redirection plugin in admin notice */
|
1284 |
+
function WPSR_admin_notice_callback() {
|
1285 |
global $wpdb;
|
1286 |
global $current_user;
|
1287 |
$plugins = get_option( 'active_plugins', array() );
|
1295 |
{
|
1296 |
$found = true;
|
1297 |
//$total = $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->prefix}redirection_items");
|
1298 |
+
$total = WPSR_getRedirectCount();
|
1299 |
if($total > 0){
|
1300 |
?>
|
1301 |
<div class="notice-success notice is-dismissible sr_notice">
|
1316 |
}
|
1317 |
}
|
1318 |
}
|
1319 |
+
add_action( 'admin_notices', 'WPSR_admin_notice_callback' );
|
1320 |
|
1321 |
+
add_action('admin_footer','WPSR_import_popup_in_footer');
|
1322 |
+
function WPSR_import_popup_in_footer()
|
1323 |
{
|
1324 |
|
1325 |
global $wpdb;
|
1340 |
|
1341 |
$found = true;
|
1342 |
$total_org = $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->prefix}redirection_items");
|
1343 |
+
$total = WPSR_getRedirectCount();
|
1344 |
$SR_import = isset($_GET['SR_import']) ? sanitize_text_field($_GET['SR_import']) : '';
|
1345 |
|
1346 |
|
1372 |
}
|
1373 |
}
|
1374 |
|
1375 |
+
add_action('wp_ajax_sr_dismiss_notice','WPSR_dismiss_notice_callback');
|
1376 |
+
function WPSR_dismiss_notice_callback()
|
1377 |
{
|
1378 |
global $current_user;
|
1379 |
$user_id = $current_user->ID;
|
1381 |
echo "1";
|
1382 |
exit;
|
1383 |
}
|
1384 |
+
function WPSR_getRedirectCount()
|
1385 |
{
|
1386 |
global $wpdb;
|
1387 |
|