WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 2 years 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:
PR Number:

Description

The 'wp_update_nav_menu' action is fired in two places with a different amount of arguments.

The first one passes along the menu id and menu data, where the second one only returns the menu id.

Attachments (1)

38057.patch (4.5 KB) - added by keraweb 3 years ago.
Fix for action parameters with backwards compatibility

Download all attachments as: .zip

Change History (15)

@keraweb
3 years ago

Fix for action parameters with backwards compatibility

#1 @keraweb
3 years ago

  • Keywords has-patch dev-feedback added

#2 @johnbillion
3 years ago

  • Owner set to johnbillion
  • Status changed from new to reviewing

This ticket was mentioned in Slack in #core by helen. View the logs.


3 years ago

#4 @helen
3 years ago

  • Type changed from defect (bug) to enhancement
  • Version changed from trunk to 4.6

#5 @johnbillion
3 years ago

  • Keywords dev-feedback removed
  • Milestone changed from Awaiting Review to 4.8

This ticket was mentioned in Slack in #core by jeffpaul. View the logs.


3 years ago

This ticket was mentioned in Slack in #core by jeffpaul. View the logs.


3 years ago

#8 @jbpaul17
3 years ago

  • Milestone changed from 4.8 to 4.8.1

Punting to 4.8.1 per today's bug scrub.

This ticket was mentioned in Slack in #core by jeffpaul. View the logs.


2 years ago

#10 @jbpaul17
2 years ago

  • Milestone changed from 4.8.1 to 4.9

Punting to 4.9 per today's bug scrub.

#11 @jbpaul17
2 years ago

  • Keywords needs-testing added

This ticket was mentioned in Slack in #core by jeffpaul. View the logs.


2 years ago

#13 @johnbillion
2 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 @keraweb
2 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.

Last edited 2 years ago by keraweb (previous) (diff)
Note: See TracTickets for help on using tickets.