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:
parent
9d0fe3958c
commit
7af8195803
|
@ -1834,7 +1834,7 @@ function unregister_setting( $option_group, $option_name, $sanitize_callback = '
|
||||||
$option_group = 'reading';
|
$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 )
|
if ( $pos !== false )
|
||||||
unset( $new_whitelist_options[ $option_group ][ $pos ] );
|
unset( $new_whitelist_options[ $option_group ][ $pos ] );
|
||||||
if ( $sanitize_callback != '' )
|
if ( $sanitize_callback != '' )
|
||||||
|
|
Loading…
Reference in New Issue