Opened 8 years ago
Last modified 20 months ago
#38057 reviewing enhancement
'wp_update_nav_menu' action returns inconsistent number of arguments
Reported by: | barryceelen | Owned by: | johnbillion |
---|---|---|---|
Milestone: | Future Release | Priority: | normal |
Severity: | normal | Version: | 4.6 |
Component: | Menus | Keywords: | has-patch needs-testing |
Focuses: | Cc: |
Description
The 'wp_update_nav_menu' action is fired in two places with a different amount of arguments.
- wp-includes/nav-menu.php
do_action( 'wp_update_nav_menu', $menu_id, $menu_data );
- wp-admin/includes/nav-menu.php
do_action( 'wp_update_nav_menu', $nav_menu_selected_id );
The first one passes along the menu id and menu data, where the second one only returns the menu id.
Attachments (1)
Change History (18)
This ticket was mentioned in Slack in #core by helen. View the logs.
8 years ago
This ticket was mentioned in Slack in #core by jeffpaul. View the logs.
7 years ago
This ticket was mentioned in Slack in #core by jeffpaul. View the logs.
7 years ago
This ticket was mentioned in Slack in #core by jeffpaul. View the logs.
7 years ago
This ticket was mentioned in Slack in #core by jeffpaul. View the logs.
7 years ago
#13
@
7 years ago
- Milestone changed from 4.9 to Future Release
@keraweb I know we discussed this in person, but can you refresh my memory on why the changes to the menu data were needed? Thanks!
#14
@
7 years ago
@johnbillion Wow this is a while ago.
From what I see the attributes and array keys were inconsistent at two locations where the same action is used.
This fix makes it so that both locations where the action is used will pass the same parameters and take the same array keys while maintaining backwards compatibility with the original situation.
Fix for action parameters with backwards compatibility