[wp-trac] [WordPress Trac] #31675: register_sidebar() without `id` parameter should be _doing_it_wrong()

WordPress Trac noreply at wordpress.org
Wed Apr 8 21:31:03 UTC 2015


#31675: register_sidebar() without `id` parameter should be _doing_it_wrong()
------------------------------+--------------------------
 Reporter:  markjaquith       |       Owner:  markjaquith
     Type:  enhancement       |      Status:  reopened
 Priority:  normal            |   Milestone:  4.2
Component:  Widgets           |     Version:
 Severity:  normal            |  Resolution:
 Keywords:  has-patch commit  |     Focuses:
------------------------------+--------------------------

Comment (by miqrogroove):

 I did some testing on this issue and found several more problems:

 1. The new E_USER_NOTICE is essentially a nuisance error because setting
 the sidebar `id` to its default value does nothing.
 1. The default value for a sidebar `id` is identical to the `id` hardcoded
 into the bundled themes, causing the themes to share sidebars regardless
 whether it is specified or not.
 1. Changing the sidebar `id` to a unique value not only causes any
 existing widgets to be deactivated, but may also cause any call to
 dynamic_sidebar() to fail because its default argument corresponds to the
 default sidebar `id`.

 I really can't find a reason for throwing a new error when the recommended
 action has no effect.

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


More information about the wp-trac mailing list