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.


Top ↑

Source

File: wp-includes/nav-menu.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
3.0.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.