CSS classes generated before calling wp_nav_menu_objects
-
I’ve received a support issue for my plugin (at https://www.ads-software.com/support/topic/issue-with-default-wordpress-sidebar-menu?replies=5). I’ve searched Walker_Nav_Menu class and found that the CSS classes are generated before the wp_nav_menu_objects hook is called.
I haven’t looked into it in detail yet, but it seems to me from the comments that this hook is assumed to yield a filtered set of menu items, and the code is not prepared for handling cases where the hook actually yields more menu items, as I’ve used it.
What would be the best way to re-add the .current-post-ancestor, .current-menu-parent, .current-post-parent CSS classes to the menu items? Should I correct for this, or should I report it elsewhere?
Thank you kindly in advance.
Kind regards,
Diana
- The topic ‘CSS classes generated before calling wp_nav_menu_objects’ is closed to new replies.