Override core private function without hack (2 posts)

  1. gabrielstuff
    Posted 3 years ago #

    Hi there,

    I've modified _wp_menu_item_classes_by_context in order to handle some special URL properly with menu.
    Testing with a default install and URL rewritting + parameters GET/POST was a fail.

    So now that I've hacked, I'd like to "filter" this custom function with my_wp_menu_item_classes_by_context

    I do not really from where to go since the private function pass a pointer to the $menu and not the menu itself, so basically it return nothing...

    I've tried :

    add_filter('_wp_menu_item_classes_by_context', 'my_wp_menu_item_classes_by_context', 1, 2);

    But it gives nothing, giving that my_wp_menu_item_classes_by_context is the new function...

    Thank you !

  2. jammy to go
    Posted 2 years ago #

    Have you managed to solve the issue?

Topic Closed

This topic has been closed to new replies.

About this Topic