How to get menu location in wp_update_nav_menu hook

Question

I want to get the menu location in the wp_update_nav_menu (during menu save action)

  add_action('wp_update_nav_menu', function ($id, $data = NULL)
    {
        error_log( var_export($data, true) );

    }, 10, 2);

However, the data only contains the menu-name, so how can I get the menu location?

0
, , , , Yoga 2 years 2020-01-13T08:39:38-05:00 0 Answers 94 views 0

Leave an answer

Browse
Browse