do_action( 'wp_update_nav_menu', int $menu_id, array $menu_data )

Fires after a navigation menu has been successfully updated.


Parameters

$menu_id int
ID of the updated menu.
$menu_data array
An array of menu data.

Top ↑

Source

File: wp-includes/nav-menu.php. View all references

do_action( 'wp_update_nav_menu', $menu_id, $menu_data );


Top ↑

Changelog

Changelog
Version Description
3.0.0 Introduced.

Top ↑

User Contributed Notes

  1. Skip to note 1 content
    Contributed by Nitish Kaila

    If you are using 2 arguments for this action, in the callback function second argument needs a default empty array. If the second argument does not have a default array then it will throw the fatal error.

    function wpdocs_update_menu_stuff_after_update( $menu_id, $menu_data = array() ) {
    	//add menu stuff
    }
    add_action( 'wp_update_nav_menu', 'wpdocs_update_menu_stuff_after_update', 10, 2 );

You must log in before being able to contribute a note or feedback.