[wp-trac] [WordPress Trac] #14256: register_sidebar() loses track of its widgets when moved
WordPress Trac
wp-trac at lists.automattic.com
Fri Jul 9 23:49:23 UTC 2010
#14256: register_sidebar() loses track of its widgets when moved
--------------------------+-------------------------------------------------
Reporter: wjm | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Widgets | Version: 3.0
Severity: normal | Keywords:
--------------------------+-------------------------------------------------
I have registered a sidebar container, setting a name,
for example
{{{
register_sidebar( array(
'name' => __( 'Test Widget' ),
) );
}}}
if you move the order in which it gets registered (let's say, you register
it first and then you decide to move it, and register second), all the
widgets inside it will get lost.
this is due to the ID being generated by default based on its order
number. so when you change the order, you change the ID, and everything is
lost.
attached is a patch that: when given a title, it sets the id by default
based on the title, and not on the ORDER NUMBER.
It only uses the order number when no title is given.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/14256>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list