[wp-trac] [WordPress Trac] #19709: Add 'before_sidebar' and 'after_sidebar' attributes to register_sidebar()
WordPress Trac
noreply at wordpress.org
Tue Nov 3 14:30:19 UTC 2020
#19709: Add 'before_sidebar' and 'after_sidebar' attributes to register_sidebar()
-------------------------------------------+-----------------------
Reporter: dgwyer | Owner: audrasjb
Type: task (blessed) | Status: reopened
Priority: normal | Milestone: 5.6
Component: Widgets | Version: 2.2
Severity: normal | Resolution:
Keywords: good-first-bug has-unit-tests | Focuses:
-------------------------------------------+-----------------------
Comment (by lpointet):
Hi,
I don't know if I should file a new ticket for this, but this commit just
break admin widgets UI (JS).
If you set a `before_sidebar` to be a `<div>` for example, it will be
rendered in admin as well, since `dynamic_sidebar` is called, and the
sortable script will break, resulting in widgets disappearing from
sidebars after the admin page is reloaded and a sidebar is updated.
I guess a check for `is_admin()` before adding those elements would be
sufficient, or maybe a filter?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/19709#comment:21>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list