Opened 7 years ago
Closed 7 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 |
|---|---|---|---|
| Priority: | normal | Milestone: | 5.3 |
| Component: | Menus | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: | docs |
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
@
7 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()
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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()