[wp-trac] [WordPress Trac] #18954: Automatically whitelist screen options added via add_screen_option()
WordPress Trac
noreply at wordpress.org
Fri Apr 10 16:32:54 UTC 2015
#18954: Automatically whitelist screen options added via add_screen_option()
-------------------------+-----------------------------
Reporter: mdawaffe | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: Plugins | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses: administration
-------------------------+-----------------------------
Comment (by GunGeekATX):
Would love to see this as well. Spent the last couple hours digging
through core to implement custom screen options for a plugin. I had to
bypass {{{add_screen_option()}}} entirely, use the {{{screen_settings}}}
filter to create the HTML form fields, and use the
{{{check_admin_referer}}} action to hook into saving the custom form
fields since. The first call in {{{set_screen_options()}}} is
{{{check_admin_referer()}}}, so hooking into the action called at the end
of that function seemed to be the only way to get access to my fields
before the redirect happened.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/18954#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list