Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#42289 closed defect (bug) (fixed)

Extra space in Walker_Nav_Menu::start_lvl()

Reported by: sergeybiryukov's profile SergeyBiryukov Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 4.9 Priority: normal
Severity: normal Version: 4.8
Component: Menus Keywords:
Focuses: Cc:


[40665] introduced an extra space in the <ul> tag for submenus:

<ul  class="sub-menu">

This 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;

Change History (1)

#1 @SergeyBiryukov
7 years ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 41955:

Menus: Remove an extra space in the <ul> tag in Walker_Nav_Menu::start_lvl().

Fixes #42289.

Note: See TracTickets for help on using tickets.