Opened 5 years ago
Closed 5 years ago
#47524 closed defect (bug) (fixed)
Predefined value of param is wrong in \Walker_Nav_Menu::start_lvl
Reported by: | trasweb | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 5.3 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Menus | Keywords: | |
Focuses: | docs | Cc: |
Description
Signature of start_lvl
in Walker_Nav_Menu class is:
<?php public function start_lvl( &$output, $depth = 0, $args = array() )
In this, $args
is array.
However, $args
is stdClass
as we can see in comment of that method:
<?php /* ... * @param string $output Used to append additional content (passed by reference). * @param int $depth Depth of menu item. Used for padding. * @param stdClass $args An object of wp_nav_menu() arguments. ... */
Maybe null should be a better predefined value.
Change History (5)
#2
in reply to:
↑ 1
@
5 years ago
Hi, @mukesh27. You're welcome
I think that is not good option. To that method, it's passed $args
as an object. So that, comment is perfect. Predetermined value is the wrong.
Replying to mukesh27:
Hi @trasweb, welcome to WordPress Trac! Thanks for the ticket.
Can we use below doc changes
* @param stdClass $args An object of wp_nav_menu() arguments.
Replace to
* @param array $args An array of arguments. @see wp_nav_menu()
#3
@
5 years ago
- Milestone changed from Awaiting Review to 5.3
- Owner set to SergeyBiryukov
- Status changed from new to reviewing
Note: See
TracTickets for help on using
tickets.
Hi @trasweb, welcome to WordPress Trac! Thanks for the ticket.
Can we use below doc changes
* @param stdClass $args An object of wp_nav_menu() arguments.
Replace to
* @param array $args An array of arguments. @see wp_nav_menu()