updated plgntls options to improve default with new options
This commit is contained in:
@@ -1085,13 +1085,18 @@ class Plgntls_xtx {
|
||||
*
|
||||
*/
|
||||
$option_data = get_option($option_name);
|
||||
$false_serialized = serialize(false);
|
||||
$option_unserialized = @unserialize($option_data);
|
||||
if ($option_unserialized === false && $option_data != $false_serialized) {
|
||||
if (!is_string($option_data)) {
|
||||
$ret_option = $option_data;
|
||||
}
|
||||
else {
|
||||
$ret_option = $option_unserialized;
|
||||
$false_serialized = serialize(false);
|
||||
$option_unserialized = @unserialize($option_data);
|
||||
if ($option_unserialized === false && $option_data != $false_serialized) {
|
||||
$ret_option = $option_data;
|
||||
}
|
||||
else {
|
||||
$ret_option = $option_unserialized;
|
||||
}
|
||||
}
|
||||
|
||||
return $ret_option;
|
||||
@@ -1197,7 +1202,8 @@ class Plgntls_xtx {
|
||||
*/
|
||||
$name = $option['_name'];
|
||||
if (false === get_option($name)) {
|
||||
add_option($name, $option['_default'], '', 'no');
|
||||
add_option($name, '', '', 'no');
|
||||
self::update_option_safe($name, $option['_default']);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -4,7 +4,7 @@ Plugin Name: hggg_xtxpatch
|
||||
Plugin URI:
|
||||
Description: some patchs for the xootix login/registration plugin
|
||||
Author: hugogogo
|
||||
Version: 0.1.1
|
||||
Version: 0.1.2
|
||||
Author URI:
|
||||
*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user