do_action( ‘wp_update_nav_menu’, int $menu_id, array $menu_data )

Fires after a navigation menu has been successfully updated.

Parameters

$menu_idint
ID of the updated menu.
$menu_dataarray
An array of menu data.

Source

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

Changelog

VersionDescription
3.0.0Introduced.

User Contributed Notes

  1. Skip to note 2 content

    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.