Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Ryan Kanawyer

    (@ryankanawyer)

    Hey threadi,

    I am actually used to asp.net development and it would appear that I had misunderstood how the ellipse works in PHP. I thought it only packed arrays (which I had assumed was some type of temporary compression to help with large arrays) and not that the passed variables are passed as an array of varying size.

    Still though, when I call walk_category_dropdown_tree I get an error that the wrong number of parameters are passed on line 1137 of category-template.php which is line 11 of this function. The fact that the walker class requires 2 parameters seems to be an issue here unless I am doing something wrong with my call. The following is a few lines from the plugin that I am working on. $defaults is an array of presets for the variables and $atts is variables that the end user sets.

    $parsed_args = wp_parse_args($atts, $defaults);
    $get_terms_args = $parsed_args;
    unset($get_terms_args[‘name’]);
    walk_category_dropdown_tree(get_terms($get_terms_args), $parsed_args[‘depth’], $parsed_args);

    If I update category-template.php with my suggested changes above, it works without any issues but of course updating a file in wp-includes is a bad idea as it will revert back when the site is upgraded.

    Thanks for the link for WordPress core tickets. I was not really sure where I should go with this so I just started in the forum and figured I would go for a bug ticket or something if others agreed it is an actual issue.

    Hey Tracy,

    I am no expert either but I would start by looking at the plugins to see if disabling one of them fixes the issue.

    I assume you also have a dev environment and not just production? If so, I would test out some other themes to make sure it is not an issue with the Antreas theme that you are using.

    ~Ryan~

Viewing 2 replies - 1 through 2 (of 2 total)