In wp.media.view.Settings::update(), when handling checkboxes, check for a value of 'false' in addition to casting value to boolean. !! 'false' evaluates to true.

Props adamsilverstein.
Fixes #23954.


Built from https://develop.svn.wordpress.org/trunk@28371


git-svn-id: http://core.svn.wordpress.org/trunk@28199 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2014-05-11 07:03:15 +00:00
parent aeadf0c7cf
commit 5682d30b6e
2 changed files with 2 additions and 2 deletions

View File

@ -5714,7 +5714,7 @@
} }
// Handle checkboxes. // Handle checkboxes.
} else if ( $setting.is('input[type="checkbox"]') ) { } else if ( $setting.is('input[type="checkbox"]') ) {
$setting.prop( 'checked', !! value ); $setting.prop( 'checked', !! value && 'false' !== value );
} }
}, },
/** /**

File diff suppressed because one or more lines are too long