[wp-trac] [WordPress Trac] #50508: Customize: Widgets appear "inactive" by default
WordPress Trac
noreply at wordpress.org
Sat Jul 4 18:11:27 UTC 2020
#50508: Customize: Widgets appear "inactive" by default
---------------------------------------+-------------------------
Reporter: afercia | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 5.5
Component: Customize | Version: trunk
Severity: normal | Resolution:
Keywords: has-screenshots has-patch | Focuses: javascript
---------------------------------------+-------------------------
Comment (by SergeyBiryukov):
Replying to [comment:2 dlh]:
> would you mind testing [attachment:"50508.diff"]?
Thanks for the patch! It appears to solve the immediate issue.
However, that still leaves an inconsistent structure of the
`rendered_sidebars` and `rendered_widgets` properties:
{{{
rendered_sidebars:
array(5) {
[0]=>
string(9) "sidebar-1"
[1]=>
string(9) "sidebar-2"
[2]=>
string(9) "sidebar-1"
[3]=>
string(9) "sidebar-2"
[4]=>
string(9) "sidebar-1"
}
}}}
{{{
rendered_widgets:
array(7) {
["search-2"]=>
bool(true)
["recent-posts-2"]=>
bool(true)
["recent-comments-2"]=>
bool(true)
["archives-2"]=>
bool(true)
["categories-2"]=>
bool(true)
["text-2"]=>
bool(true)
["meta-2"]=>
bool(true)
}
}}}
I think that can still lead to regressions like this in the future.
[attachment:"50508.2.diff"] attemps to bring some consistency by using the
same structure for `rendered_sidebars`. As a positive side effect, this
also removes duplicate values:
{{{
array(2) {
["sidebar-1"]=>
bool(true)
["sidebar-2"]=>
bool(true)
}
}}}
Since these properties are protected, I think there should be no backward
compatibility concerns in changing the structure. Could you double check?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/50508#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list