[wp-trac] [WordPress Trac] #42289: Extra space in Walker_Nav_Menu::start_lvl()
WordPress Trac
noreply at wordpress.org
Fri Oct 20 10:37:49 UTC 2017
#42289: Extra space in Walker_Nav_Menu::start_lvl()
----------------------------+-----------------
Reporter: SergeyBiryukov | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.9
Component: Menus | Version: 4.8
Severity: normal | Keywords:
Focuses: |
----------------------------+-----------------
[40665] introduced an extra space in the `<ul>` tag for submenus:
{{{
<ul class="sub-menu">
}}}
This [https://smthemes.com/support/topic/sidebarinsportsmt_menu/ caused a
regression] in some older themes that specifically look for `<ul class
="sub-menu">` to replace it with something else, for example:
{{{
function smt_menu($a) {
$a=preg_replace("/<ul\sclass='children'>/", "<ul
class='children'$2><div class='transparent'></div><div class='inner'>",
$a);
$a=preg_replace('/<ul\sclass="sub-menu">/', "<ul class='sub-
menu'><div class='transparent'></div><div class='inner'>", $a);
$a=preg_replace("/<\/ul>/", "</div></ul>", $a);
return $a;
}
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/42289>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list