[wp-trac] [WordPress Trac] #19709: Add 'before_sidebar' and 'after_sidebar' attributes to register_sidebar()
WordPress Trac
noreply at wordpress.org
Tue Nov 3 15:43:33 UTC 2020
#19709: Add 'before_sidebar' and 'after_sidebar' attributes to register_sidebar()
--------------------------------------+-----------------------
Reporter: dgwyer | Owner: audrasjb
Type: task (blessed) | Status: reopened
Priority: high | Milestone: 5.6
Component: Widgets | Version: 2.2
Severity: normal | Resolution:
Keywords: has-unit-tests has-patch | Focuses:
--------------------------------------+-----------------------
Changes (by audrasjb):
* keywords: good-first-bug has-unit-tests => has-unit-tests has-patch
* priority: normal => high
Comment:
Nice catch @lpointet, thank you very much.
I was able to reproduce the issue by altering Twenty Twenty’s
functions.php file:
{{{
function twentytwenty_sidebar_registration() {
// Arguments used in all register_sidebar() calls.
$shared_args = array(
'before_title' => '<h2 class="widget-title subheading
heading-size-3">',
'after_title' => '</h2>',
'before_widget' => '<div class="widget %2$s"><div class
="widget-content">',
'after_widget' => '</div></div>',
'before_sidebar' => '<div class="audrasjb">', // Here
'after_sidebar' => '</div>', // And there
);
}}}
With that new div added in the admin, widgets are not moveable anymore.
`19709.3.diff` removes before_sidebar and after_sidebar markup from the
Admin.
Adding `high` priority as it is a regression introduced in 5.6, and it
breaks the widgets screen.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/19709#comment:22>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list