[wp-trac] [WordPress Trac] #28672: add_settings_field & co don't return values
WordPress Trac
noreply at wordpress.org
Fri Aug 28 16:03:26 UTC 2015
#28672: add_settings_field & co don't return values
----------------------------------------+-----------------------------
Reporter: TJNowell | Owner: obenland
Type: enhancement | Status: reviewing
Priority: normal | Milestone: 4.4
Component: Options, Meta APIs | Version: 2.7
Severity: normal | Resolution:
Keywords: needs-unit-tests has-patch | Focuses: administration
----------------------------------------+-----------------------------
Changes (by DrewAPicture):
* owner: GunGeekATX => obenland
* status: assigned => reviewing
* milestone: Awaiting Review => 4.4
Comment:
Replying to [comment:22 obenland]:
> The more I think about it the more I feel like we should leave it as is.
This will probably cause more harm than good.
I agree, in some respects. I think failing silently is kind of a feature,
not a bug.
At the same time, we can either continue to fail silently or throw a
`_doing_it_wrong()` if the `$page` doesn't exist when
`do_settings_sections()` is called and another one if `$section` isn't
defined in `do_settings_fields()` would suffice.
As you said in comment:20, it gives developers the opportunity to fix
their code while providing meaningful feedback as to why it isn't working.
This is done in [attachment:28672.3.diff].
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28672#comment:23>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list