Skip to content

Commit 3af8ff5

Browse files
authored
🔧 Apply wp_nav_menu_objects filter after context class resolution (#95)
1 parent 97fa923 commit 3af8ff5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

‎src/MenuBuilder.php‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ protected function filter(array $menu = []): array
8080

8181
_wp_menu_item_classes_by_context($menu);
8282

83+
$menu = apply_filters('wp_nav_menu_objects', $menu, []);
84+
8385
return array_map(function ($item) {
8486
$classes = array_filter($item->classes, function ($class) {
8587
foreach ($this->withoutClasses as $value) {

0 commit comments

Comments
 (0)