Config array serialized
This commit is contained in:
parent
4727ce530f
commit
1e30ba334f
@ -85,7 +85,7 @@ class StatifyBlacklist
|
|||||||
get_option('statify-blacklist'),
|
get_option('statify-blacklist'),
|
||||||
array(
|
array(
|
||||||
'active_referer' => 0,
|
'active_referer' => 0,
|
||||||
'referer' => ''
|
'referer' => array()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -112,7 +112,7 @@ class StatifyBlacklist
|
|||||||
$referer = implode('.', $referer);
|
$referer = implode('.', $referer);
|
||||||
|
|
||||||
/* Get blacklist */
|
/* Get blacklist */
|
||||||
$blacklist = explode("\r\n", self::$_options['referer']);
|
$blacklist = self::$_options['referer'];
|
||||||
|
|
||||||
/* Check blacklist */
|
/* Check blacklist */
|
||||||
return in_array($referer, $blacklist);
|
return in_array($referer, $blacklist);
|
||||||
|
@ -5,7 +5,7 @@ if ( ! empty($_POST['statifyblacklist']) ) {
|
|||||||
StatifyBlacklist::update_options(
|
StatifyBlacklist::update_options(
|
||||||
array(
|
array(
|
||||||
'active_referer' => (int)@$_POST['statifyblacklist']['active_referer'],
|
'active_referer' => (int)@$_POST['statifyblacklist']['active_referer'],
|
||||||
'referer' => (string)@$_POST['statifyblacklist']['referer']
|
'referer' => explode("\r\n", $_POST['statifyblacklist']['referer'])
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -25,7 +25,7 @@ if ( ! empty($_POST['statifyblacklist']) ) {
|
|||||||
<li>
|
<li>
|
||||||
<label for="statify-blacklist_referer">
|
<label for="statify-blacklist_referer">
|
||||||
<?php esc_html_e('Referer blacklist:', 'statify-blacklist'); ?><br />
|
<?php esc_html_e('Referer blacklist:', 'statify-blacklist'); ?><br />
|
||||||
<textarea cols="40" rows="5" name="statifyblacklist[referer]" id="statify-blacklist_referer"><?php print StatifyBlacklist::$_options['referer']; ?></textarea><br />
|
<textarea cols="40" rows="5" name="statifyblacklist[referer]" id="statify-blacklist_referer"><?php print implode("\r\n", StatifyBlacklist::$_options['referer']); ?></textarea><br />
|
||||||
<small>(<?php esc_html_e('Add one domain (without subdomains) each line, e.g. example.com', 'statify-blacklist'); ?>)</small>
|
<small>(<?php esc_html_e('Add one domain (without subdomains) each line, e.g. example.com', 'statify-blacklist'); ?>)</small>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user