[theme-reviewers] Going around the Settings API
Chip Bennett
chip at chipbennett.net
Sat Jan 18 14:28:09 UTC 2014
While I would like to see us get there, we don't currently *require* that
the settings page output its markup using settings_fields(). As long as the
markup is valid, and untrusted data are properly escaped, "hard-coded"
markup in the settings page is acceptable.
(I don't foresee that changing unless/until the Settings API is
changed/improved to include core markup for various data/field types.)
On Sat, Jan 18, 2014 at 9:20 AM, ethan anwar <ethananwar at yahoo.com> wrote:
> Hi and sorry to bother you all again!
>
> I'm reviewing another theme (
> https://themes.trac.wordpress.org/ticket/15946 ) and I have noticed what
> I consider blurry use of the Theme Settings API.
>
> Basically the theme's developer uses all the right functions, registers
> the main settings array via register_setting() but doesn't add any settings
> via add_settings_field(). Then, inside the function for the actual options
> page he uses settings_fields() then
> do_settings_sections() which probably don't return anything. After this,
> HTML follows with the actual code for the settings.
>
> What's your opinion on this? Shouldn't he use add_settings_section() and
> add_settings_field() if he's going with do_settings_sections() and
> settings_fields() ?
>
> As always thanks a lot for your time guys!
> Kay
>
> _______________________________________________
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20140118/5fc0f330/attachment.html>
More information about the theme-reviewers
mailing list