#56574 closed defect (bug) (fixed)
Docs: Wrong parameter type used for Walker_Nav_Menu class
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 6.1 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Menus | Keywords: | has-patch commit good-first-bug |
| Focuses: | docs | Cc: |
Description
In class-walker-nav-menu.php nav_menu_item_id filter inline document define wrong @param type.
$menu_id @param should be int instead of string
Change History (8)
This ticket was mentioned in PR #3256 on WordPress/wordpress-develop by dilipbheda.
3 years ago
#1
mukeshpanchal27 commented on PR #3256:
3 years ago
#2
Great catch @dilipbheda
#3
@
3 years ago
- Keywords commit good-first-bug added
- Milestone changed from Awaiting Review to 6.1
Hi there!
Thanks for the ticket and patch.
$menu_item->ID is always integer value so this changes make sense. The PR is LGTM and approved.
Added ticket in 6.1 milestone for visibility.
#5
@
3 years ago
My conclusion is existing code is alright!
Here all 4 param descriptions are for the filter.
First value of the filter is
'menu-item-' . $menu_item->ID
So, $menu_id is passed as string to the filter.
I haven’t tested the code by using the filter though.
Please correct me if I am wrong.
Trac ticket: https://core.trac.wordpress.org/ticket/56574