Set closed for nonbools when blank - http://mosquito.wordpress.org/view.php?id=550
git-svn-id: https://develop.svn.wordpress.org/trunk@2308 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
4d7f88149a
commit
c4a202338e
@ -55,7 +55,7 @@ case 'update':
|
||||
$new_val = trim($_POST[$option->option_name]);
|
||||
if ( !$new_val && $old_val != 0 )
|
||||
$new_val = '';
|
||||
if( in_array($option->option_name, $nonbools) && $new_val == '0' )
|
||||
if( in_array($option->option_name, $nonbools) && ( $new_val == '0' || $new_val == '') )
|
||||
$new_val = 'closed';
|
||||
if ($new_val !== $old_val) {
|
||||
$result = $wpdb->query("UPDATE $wpdb->options SET option_value = '$new_val' WHERE option_name = '$option->option_name'");
|
||||
|
Loading…
Reference in New Issue
Block a user