From 7af8195803e6ac92beb94ce05ebdb245566c9c98 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Mon, 22 Jun 2015 20:50:30 +0000 Subject: [PATCH] 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 --- src/wp-admin/includes/plugin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-admin/includes/plugin.php b/src/wp-admin/includes/plugin.php index ef6494e635..968f6e383d 100644 --- a/src/wp-admin/includes/plugin.php +++ b/src/wp-admin/includes/plugin.php @@ -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 != '' )