Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   New Versions, & Updating (http://forum.bytesforall.com/forumdisplay.php?f=12)
-   -   [SOLVED] PATCH 3724-01: Custom Menu/SubMenu issue after upgrading to WP 4.4 (http://forum.bytesforall.com/showthread.php?t=23360)

juggledad Dec 15, 2015 04:28 AM

[SOLVED] PATCH 3724-01: Custom Menu/SubMenu issue after upgrading to WP 4.4
 
1 Attachment(s)
WordPress version 4.4 changed the way the menu structure was returned when using a custom menu. The symptom is that a menu item before a menu with a submenu would show an indicator that there were child items, while the actual parent of the submenu would not show the indicator.

To fix this problem you can eithor (1) edit bfa_new_wp3_menus.php and change line 43 from
HTML Code:

        $newmenu = preg_replace("/<li (.*?)class=\"(.*?)\">(.*?)\n(.*?)<ul class=\"/i","<li \\1 class=\"rMenu-expand \\2\">\\3\n\\4<ul class=\"rMenu-ver ",$newmenu);
to
HTML Code:

        $newmenu = preg_replace("~menu-item-has-children~","rMenu-expand menu-item-has-children",$newmenu);
or (2) download the attached file, unzip it and replace bfa_new_wp3_menus.php with the fixed version.

kdawes01 Dec 15, 2015 02:36 PM

Good fix! Thanks Juggledad!

Do you know many ATA versions back this fix will work for?

juggledad Dec 15, 2015 02:51 PM

The code is the same all the way back to 3.7.15 - maybe earlier, but that's the earliest I had on my maching to check with.

kdawes01 Dec 15, 2015 03:12 PM

Perfect!

Merci!!!

SubtleTom Mar 27, 2016 02:29 AM

Quote:

Originally Posted by jugglerdad (Post 113213)
WordPress version 4.4 changed the way the menu structure was returned when using a custom menu. The symptom is that a menu item before a menu with a submenu would show an indicator that there were child items, while the actual parent of the submenu would not show the bathmate indicator.

To fix this problem you can eithor (1) edit bfa_new_wp3_menus.php and change line 43 from
HTML Code:

        $newmenu = preg_replace("/<li (.*?)class=\"(.*?)\">(.*?)\n(.*?)<ul class=\"/i","<li \\1 class=\"rMenu-expand \\2\">\\3\n\\4<ul class=\"rMenu-ver ",$newmenu);
to
HTML Code:

        $newmenu = preg_replace("~menu-item-has-children~","rMenu-expand menu-item-has-children",$newmenu);
or (2) download the attached file, unzip it and replace bfa_new_wp3_menus.php with the fixed version.

I haven't updated wordpress in a long time. If I update wordpress and update to the latest version of Atahualpa will there be a problem with the menus or is this fixed in the latest version?

juggledad Apr 8, 2016 04:07 AM

this patch still applies to teh latest version of Atahualpa


All times are GMT -6. The time now is 04:29 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.