wp_create_nav_menu WordPress Action Hook
The wp_create_nav_menu hook is triggered when a new navigation menu is created. It allows for custom functionality to be added when a new menu is created. This hook is useful for plugin and theme developers who need to add custom functionality when a new menu is created.
do_action( 'wp_create_nav_menu', int $term_id , array $menu_data ) #
Fires after a navigation menu is successfully created.
Parameters
- $term_id
(int)ID of the new menu.
- $menu_data
(array)An array of menu data.
Source
File: wp-includes/nav-menu.php
Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |