#43207 closed defect (bug) (fixed)
`unregister_setting()` does not remove default option filter
| Reported by: | flixos90 | Owned by: | flixos90 |
|---|---|---|---|
| Priority: | normal | Milestone: | 5.1 |
| Component: | Options, Meta APIs | Version: | 4.7 |
| Severity: | normal | Keywords: | has-patch has-unit-tests commit |
| Cc: | Focuses: |
Description
When using register_setting() and providing a 'default' value, that value is set as the default for get_option() calls using a filter. However, when using unregister_setting() for such a setting, the filter hook is not removed again. This seems like an oversight and should be fixed.
For reference, the functionality was introduced in [38910].
Attachments (1)
Change History (10)
#7
in reply to: ↑ 6
@
9 years ago
Replying to jorbin:
In 42663:
I have discussed this with both involved parties and will be reverting this revert. There will be no further back-and-forth via commits without documented discussion. I will also be reviewing our documentation around communication and ensuring that our socially-understood guideline of family-friendly, non-profane language in open project communication is also a written one. This is indeed a small thing for a lead to pull her lead card on, but here we are.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
I just noticed this is not as critical as I had initially thought. Since the setting will not be registered anymore, the filter won't change anything. Regardless, it's redundant that way, so it should be removed again.
43207.diff adds a patch with a test.