[wp-trac] [WordPress Trac] #19709: Add 'before_sidebar' and 'after_sidebar' attributes to register_sidebar()

WordPress Trac noreply at wordpress.org
Tue Nov 17 20:16:05 UTC 2020


#19709: Add 'before_sidebar' and 'after_sidebar' attributes to register_sidebar()
--------------------------------------+-----------------------
 Reporter:  dgwyer                    |       Owner:  audrasjb
     Type:  task (blessed)            |      Status:  closed
 Priority:  high                      |   Milestone:  5.6
Component:  Widgets                   |     Version:  2.2
 Severity:  normal                    |  Resolution:  fixed
 Keywords:  has-unit-tests has-patch  |     Focuses:
--------------------------------------+-----------------------
Changes (by helen):

 * status:  reopened => closed
 * resolution:   => fixed


Comment:

 Replying to [comment:32 SergeyBiryukov]:
 > The `id` argument is already [source:tags/5.5.3/src/wp-
 includes/widgets.php?marks=257#L247 `sidebar-$i` by default], so it seems
 like this would now be `sidebar-sidebar-$i` :)

 Definitely don't want `sidebar-sidebar-$i` :)

 > I'm not sure duplicate IDs are possible here. Could we have an example
 of when that's the case?

 On re-reading, I think you're right. I thought that it was used in
 `before_widget` but clearly that's a widget ID and not the sidebar ID, and
 whatever I was thinking about the sidebar ID being used somewhere doesn't
 seem right. Closing as fixed.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/19709#comment:33>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list