Set closed for nonbools when blank - http://mosquito.wordpress.org/view.php?id=550
git-svn-id: http://svn.automattic.com/wordpress/trunk@2308 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
03cf86ffed
commit
89dcce8b1f
|
@ -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