Skip to content

Instantly share code, notes, and snippets.

@dieppon
Last active July 1, 2020 10:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dieppon/ecb6741c45192425c6c58d821ef62cfb to your computer and use it in GitHub Desktop.
Save dieppon/ecb6741c45192425c6c58d821ef62cfb to your computer and use it in GitHub Desktop.
Fixes walker php error on Wordpress Advanced Menu Widget
diff --git a/class-advanced-menu-walker.php b/class-advanced-menu-walker.php
index 324777f..c97c831 100644
--- a/class-advanced-menu-walker.php
+++ b/class-advanced-menu-walker.php
@@ -160,7 +160,7 @@ class AMW_Related_Sub_Items_Walker extends Walker_Nav_Menu {
}
}
- function walk( $elements, $max_depth ) {
+ function walk( $elements, $max_depth, ...$args ) {
$args = array_slice(func_get_args(), 2);
$output = '';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment