[wp-trac] [WordPress Trac] #31675: register_sidebar() without `id` parameter should be _doing_it_wrong()
WordPress Trac
noreply at wordpress.org
Fri May 1 22:09:31 UTC 2015
#31675: register_sidebar() without `id` parameter should be _doing_it_wrong()
------------------------------+--------------------------
Reporter: markjaquith | Owner: markjaquith
Type: enhancement | Status: closed
Priority: normal | Milestone: 4.2
Component: Widgets | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch commit | Focuses:
------------------------------+--------------------------
Comment (by juggledad):
Replying to [comment:23 markjaquith]:
> In [changeset:"32110"]:
> {{{
> #!CommitTicketReference repository="" revision="32110"
> Tell developers how to correctly silence `register_sidebar()` notices.
>
> * If we just tell them they they should set an `id` parameter, they
might set an arbitrary one on an existing (i.e. not in-development) theme,
causing widgets to be lost.
> * This way, we tell them to set it to the auto-generated `id` that the
sidebar already has.
> * Widget content is not lost, and now their sidebar has a concrete
handle.
>
> fixes #31675
> }}}
Just a question about this. For an existing themes - let's say that three
users have the theme in production and have many widgets n the sidebar.
Their sidebars have been given some ID and in each of the three users
sites that ID could be different. Now how does a theme developer set an ID
that won't mess up one or more of the users?
If the answer is to query the existing value and use that, then what is
the use of forcing the use of the ID, why not leave this the way it is -
if a theme developer uses an ID great, if not use teh auto generated
value.
Just wondering.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31675#comment:26>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list