Make WordPress Core

Opened 13 years ago

Closed 11 years ago

Last modified 11 years ago

#26479 closed defect (bug) (fixed)

unregister_setting not working

Reported by: cvedovini Owned by: wonderboymusic
Priority: normal Milestone: 4.3
Component: Plugins Version: 2.6
Severity: normal Keywords: has-patch commit 3.9-early
Cc: Focuses: administration

Description (last modified by nofearinc)

The unregister_setting function is not working, there's a bug at line 1743 of the plugin.php file:

$pos = array_search( $option_name, (array) $new_whitelist_options );

should be

$pos = array_search( $option_name, (array) $new_whitelist_options[$option_group] );

Attachments (1)

26479.diff​ (538 bytes ) - added by nofearinc 13 years ago.
update $new_whitelist_options search

Download all attachments as: .zip

Change History (9)

#1 @nofearinc
13 years ago

  • Description modified (diff)
  • Keywords has-patch needs-testing added
  • Version 3.7.1 → 2.6

@nofearinc
13 years ago

update $new_whitelist_options search

#2 @nofearinc
13 years ago

I could confirm the issue and the fix from cvedovini seems to work for me. Uploaded a patch following his change proposal.

#3 @goto10
13 years ago

  • Cc dromsey@… added

#4 @SergeyBiryukov
13 years ago

  • Keywords commit 3.9-early added; needs-testing removed
  • Milestone Awaiting Review → Future Release

Introduced in [8802], modified in [11021].

#5 @nacin
13 years ago

  • Component Plugins → Admin APIs
  • Focuses administration added

#6 @nacin
13 years ago

  • Component Admin APIs → Plugins

Sorry for the noise.

#7 @wonderboymusic
11 years ago

  • Owner set to wonderboymusic
  • Resolution → fixed
  • Status new → closed

In 32905:

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

Props nofearinc.
Fixes #26479.

#8 @wonderboymusic
11 years ago

  • Milestone Future Release → 4.3
Note: See TracTickets for help on using tickets.