We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c6b5ed9 commit 307c3b9Copy full SHA for 307c3b9
src/Directives/WordPress.php
@@ -631,6 +631,25 @@ public function directives(): array
631
632
return "<?php echo get_theme_mod({$mod}); ?>";
633
},
634
+
635
+ /*
636
+ |---------------------------------------------------------------------
637
+ | @menu / @hasmenu / @endhasmenu
638
639
+ */
640
641
+ 'menu' => function ($expression) {
642
+ $expression = $this->parse($expression);
643
+ return "<?php wp_nav_menu({$expression->get(0)}); ?>";
644
+ },
645
646
+ 'hasmenu' => function ($expression) {
647
+ return "<?php if (has_nav_menu($expression)) : ?>";
648
649
650
+ 'endhasmenu' => function () {
651
+ return '<?php endif; ?>';
652
653
];
654
}
655
0 commit comments