[wp-trac] [WordPress Trac] #31675: register_sidebar() without `id` parameter should be _doing_it_wrong()
WordPress Trac
noreply at wordpress.org
Wed Apr 8 17:32:47 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 markjaquith):
> "Manually set ... to silence this notice and keep existing sidebar
content" is good advice only for a theme that wont be used on any other
install, correct?
Not that I can think of. Essentially, by neglecting to choose an `id`,
WordPress chooses one for you. But the one WordPress chooses is based on
the order you defined the sidebars.
So say a theme update adds a new sidebar, in the middle of the others.
Stuff going to get jumbled. The notice tells you to set manually the `id`
values that WordPress is currently auto-choosing. Then, if you add a new
sidebar (also with an id), the old ones don't jumble.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31675#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list