[wp-trac] [WordPress Trac] #12596: "screen options" tab disappearing for plugins

WordPress Trac wp-trac at lists.automattic.com
Mon Mar 15 08:25:34 UTC 2010


#12596: "screen options" tab disappearing for plugins
--------------------------+-------------------------------------------------
 Reporter:  arena         |       Owner:  westi            
     Type:  defect (bug)  |      Status:  new              
 Priority:  normal        |   Milestone:  3.0              
Component:  Plugins       |     Version:  3.0              
 Severity:  normal        |    Keywords:  reporter-feedback
--------------------------+-------------------------------------------------

Comment(by TobiasBg):

 I haven't yet have time to look at your plugin and I'm only saying all of
 this from recent experience when working with the metaboxes. I, too, had
 the problem to be in need of setting the screen ID which resembles the ID
 the JavaScript uses to store/ajax the information about the state of the
 meta boxes. My first idea was to use the "screen_meta_screen" filter, but
 then I basically found out what you mention in the initial post: that it
 is not called regularly so that I could rely on it. Then I found out about
 the "set_current_screen()" function. At first I wanted to hook into it,
 but couldn't really find a good hook in there. That's when I noticed that
 I could just call the function myself, with my desired screenID/pagenow as
 the parameter - and all my problems were solved.

 What I'm trying to say: Also the filter "screen_meta_screen" might have
 worked before, it is not necessarily a bug if it doesn't anymore, because
 it might not have been used in the intended fashion (which I don't know,
 as I'm not too familiar with the background of that part of the code).

 > "screen_meta_screen" by giving the screen a specific name used to have
 that screen properly set in javascript and php (javascript 'screen' name
 used in setting the columns in a list or ordering meta boxes in a page, i
 am using both of them) ..

 That's exactly what I'm doing with set_current_screen() as outlined above.
 Instead of setting it with the filter, just set the screen with that
 function, called in the {{{load-{$hook}}}} filter of the admin page.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/12596#comment:12>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list