mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
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:
parent
aeadf0c7cf
commit
5682d30b6e
@ -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 );
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
2
wp-includes/js/media-views.min.js
vendored
2
wp-includes/js/media-views.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user