walk_category_dropdown_tree error
-
It appears that the code for this function is missing some variables that need to be passed.
The current function only receives 1 packed parameter labeled …%args and passes that parameter to walker but walker requires 2 parameters so an error is thrown that one was passed when two was expected. https://developer.www.ads-software.com/reference/classes/Walker/walk/
From what I can tell, …$args is in place of the optional parameters and does not cover either of the required parameters. That said, I think it needs to be changed so line 1 of this function should be “function walk_category_dropdown_tree( $categories, $depth, …$args ) {” and line 11 should be “return $walker->walk( $categories, $depth, …$args );”
I am also not all that sure why depth is required for walker considering it has a default set and can be retrieved by running the arguments passed through wp_parse_args. I am fairly new to WordPress development though so I may be missing something.
The page I need help with: [log in to see the link]
- The topic ‘walk_category_dropdown_tree error’ is closed to new replies.