[wp-trac] [WordPress Trac] #18785: Modernize screen functions

WordPress Trac wp-trac at lists.automattic.com
Sun Oct 9 21:42:08 UTC 2011


#18785: Modernize screen functions
----------------------------+------------------------------
 Reporter:  nacin           |       Owner:  nacin
     Type:  enhancement     |      Status:  assigned
 Priority:  normal          |   Milestone:  Awaiting Review
Component:  Administration  |     Version:  3.3
 Severity:  normal          |  Resolution:
 Keywords:  needs-patch     |
----------------------------+------------------------------

Comment (by mbijon):

 Andrew, your num2 started with some of my code in #18690. It's patched up
 in the simplest manner above.

 I actually like this method better than the original. The original intent
 of generating the HTML ID (instead of assigning it in incremented ID or
 similar) was to give plugin authors the ability to add tabs in a
 predictable way so they could apply custom CSS.
 * The slugs I originally used weren't HTML-safe, but didn't regex the
 title to A-Z0-9.
 * The L613 you note used sanitize_html_class(). That may have made things
 HTML-safe, but used a heavy-handed regex and since we didn't support
 passing in a fallback string would have left the CSS class blank for the
 examples you gave.

 My patch above will require that 6 of the 11 places where add_help_tab()
 to have an ID value added.

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


More information about the wp-trac mailing list