[wp-trac] [WordPress Trac] #32918: _wp_menu_item_classes_by_context does not generate "current-menu-ancestor" class when the menu structure was changed by e.g. a plugin
WordPress Trac
noreply at wordpress.org
Sat Jun 21 16:19:44 UTC 2025
#32918: _wp_menu_item_classes_by_context does not generate "current-menu-ancestor"
class when the menu structure was changed by e.g. a plugin
-----------------------------------------------------+---------------------
Reporter: anaid | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone:
Component: Menus | Version: 4.2.2
Severity: normal | Resolution:
Keywords: has-patch needs-refresh needs-test-info | Focuses:
-----------------------------------------------------+---------------------
Changes (by SirLouen):
* keywords: has-patch needs-testing => has-patch needs-refresh needs-test-
info
Comment:
@anaid
A long time has passed, and I'm still able to reproduce this
Much has changed since then, even the new button seems to be ` Replace by
posts in this category.`
Currently, the patch is not applying, some variables have changed like
`$ancestor_id`
Apart from this, I've tried making it apply, and it's partially working,
but it's unable to select the right element any more. Needs some review.
Adding for now a `needs-refresh` and see how it goes.
Still, I would also add some `needs-test-info` and see if this can be
minimally reproducible in a simpler snippet of code than a whole plugin.
Just to play around with this and maybe add some tests (not sure if this
apply, but just in case)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32918#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list