wp_update_nav_menu_item
Action HookDescription
Fires after a navigation menu item has been updated.Hook Information
File Location |
wp-includes/nav-menu.php
View on GitHub
|
Hook Type | Action |
Line Number | 631 |
Hook Parameters
Type | Name | Description |
---|---|---|
int
|
$menu_id
|
ID of the updated menu. |
int
|
$menu_item_db_id
|
ID of the updated menu item. |
array
|
$args
|
An array of arguments used to update a menu item. |
Usage Examples
Basic Usage
<?php
// Hook into wp_update_nav_menu_item
add_action('wp_update_nav_menu_item', 'my_custom_function', 10, 3);
function my_custom_function($menu_id, $menu_item_db_id, $args) {
// Your custom code here
}
Source Code Context
wp-includes/nav-menu.php:631
- How this hook is used in WordPress core
<?php
626 *
627 * @param int $menu_id ID of the updated menu.
628 * @param int $menu_item_db_id ID of the updated menu item.
629 * @param array $args An array of arguments used to update a menu item.
630 */
631 do_action( 'wp_update_nav_menu_item', $menu_id, $menu_item_db_id, $args );
632
633 return $menu_item_db_id;
634 }
635
636 /**
PHP Documentation
<?php
/**
* Fires after a navigation menu item has been updated.
*
* @since 3.0.0
*
* @see wp_update_nav_menu_item()
*
* @param int $menu_id ID of the updated menu.
* @param int $menu_item_db_id ID of the updated menu item.
* @param array $args An array of arguments used to update a menu item.
*/
Quick Info
- Hook Type: Action
- Parameters: 3
- File: wp-includes/nav-menu.php
Related Hooks
Related hooks will be displayed here in future updates.