[wp-trac] [WordPress Trac] #12615: Add "first" and "last" CSS-class-names to each Widget in sidebars (Frontend)

WordPress Trac wp-trac at lists.automattic.com
Thu Jan 13 15:57:20 UTC 2011


#12615: Add "first" and "last" CSS-class-names to each Widget in sidebars
(Frontend)
-----------------------------+-----------------------------
 Reporter:  hakre            |       Owner:
     Type:  defect (bug)     |      Status:  assigned
 Priority:  normal           |   Milestone:  Future Release
Component:  Themes           |     Version:
 Severity:  normal           |  Resolution:
 Keywords:  has-patch close  |
-----------------------------+-----------------------------

Comment (by garyc40):

 Replying to [comment:13 hakre]:
 > Don't forget to test the widget screen in the backend.

 Tested my patch, switching stuff in and out, re-ordering items etc. It
 works.

 > And try to exploit the last one, imagine the last widget is not
 registered.

 Hmm, not sure what you meant by that. All the items that are iterated in
 that function are registered to the dynamic sidebar being output, correct?

 Anyways, this is what I thought when I wrote "That makes sense". I haven't
 heard anyone saying that they need to use these "first" and "last"
 classes. I myself couldn't think of a specific scenario when we need this.
 We're moving away from supporting IE6, and :first-child works just fine in
 IE7, 8 and 9.

 Perhaps a filter? In #15529, there's already a filter for menu items'
 classes.

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


More information about the wp-trac mailing list