[wp-trac] [WordPress Trac] #9657: Allow custom screen_meta dropdown panels

WordPress Trac wp-trac at lists.automattic.com
Wed Mar 23 00:09:16 UTC 2011


#9657: Allow custom screen_meta dropdown panels
----------------------------------------------+----------------------------
 Reporter:  hakre                             |       Owner:  ptahdunbar
     Type:  enhancement                       |      Status:  accepted
 Priority:  normal                            |   Milestone:  Future
Component:  Administration                    |  Release
 Severity:  normal                            |     Version:  3.0
 Keywords:  3.2-early 3.2-early dev-feedback  |  Resolution:
----------------------------------------------+----------------------------
Changes (by ptahdunbar):

 * keywords:  3.2-early 3.2-early => 3.2-early 3.2-early dev-feedback


Comment:

 Alright, so here's my first pass at a proper screen meta api:

 New functions:
 * add_screen_meta_tab( $id, $label, $capability, $screen, $priority );
 * add_screen_meta_section( $id, $callback, $tab, $priority, $callback_args
 );
 * do_screen_meta();

 The process is fairly simple. Hook into screen_meta; register a new "tab",
 then add sections to registered "tabs". do_screen_meta() handles the rest.

 I've converting the existing screen_meta mess into the api so you can see
 how it looks. It's a first pass so it doesn't have any remove_* functions
 or proper hooks/filters. Check it out and let me know if this is the
 direction you guys want to go.

 You'll notice the tabs and sections use capabilities for some nice access
 control. They also use priorities so you can order the tabs and sections
 regardless of which was called first.

 That's all for now. get this in quick while it's hot, or shoot me some
 feedback/suggestions.

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


More information about the wp-trac mailing list