Skip to content

Remove tax query before fetching nav menu items - #2

Open
barryceelen wants to merge 1 commit into
Faison:masterfrom
barryceelen:patch-1
Open

Remove tax query before fetching nav menu items#2
barryceelen wants to merge 1 commit into
Faison:masterfrom
barryceelen:patch-1

Conversation

@barryceelen

Copy link
Copy Markdown

WordPress 6.0 refactors the query in wp_get_nav_menu_items() to use a tax_query. The navception() filter however passes along the original $args, including the newly added tax query, when fetching menu items, causing an infinite loop. This update removes the $args['tax_query'] key before passing it along to wp_get_nav_menu_items().

WordPress 6.0 refactors the query in `wp_get_nav_menu_items()` to [use a tax_query](https://github.com/WordPress/wordpress-develop/pull/2399/files#diff-1b01be7c995419a8307dd2b2c8e1b4fc96e75ef07df4e8e66c45cc8273d02e0fR708). The `navception()` filter however passes along the original $args, including the tax query, when fetching menu items, causing an infinite loop. This update removes the `$args['tax_query']` key before passing it along to `wp_get_nav_menu_items()`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant