[wp-trac] [WordPress Trac] #18954: Automatically whitelist screen options added via add_screen_option()
WordPress Trac
noreply at wordpress.org
Wed Aug 12 17:45:37 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 kitchin):
One more comment - I reconsidered and plugins are correct to send back
$status (which is false) for unknown options. The correct way to prevent
conflicts is for plugins to do
{{{
if ( ! empty( $_GET[ 'page' ] ) && $menu_slug === $_GET[ 'page' ] ) {
add_filter( 'set-screen-option', ..., 10, 3);
}
}}}
And use the same $menu_slug in add_menu_page().
Still think my new filter would be the best solution, since it would
prevent plugins going nuts on the input.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/18954#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list