In unregister_setting(), search for $option_name in a segment of $new_whitelist_options keyed by $option_group.

Props nofearinc.
Fixes #26479.


git-svn-id: https://develop.svn.wordpress.org/trunk@32905 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor
2015-06-22 20:50:30 +00:00
parent 9d0fe3958c
commit 7af8195803

View File

@@ -1834,7 +1834,7 @@ function unregister_setting( $option_group, $option_name, $sanitize_callback = '
$option_group = 'reading';
}
$pos = array_search( $option_name, (array) $new_whitelist_options );
$pos = array_search( $option_name, (array) $new_whitelist_options[ $option_group ] );
if ( $pos !== false )
unset( $new_whitelist_options[ $option_group ][ $pos ] );
if ( $sanitize_callback != '' )