Skip to content

Commit

Permalink
refactor(NavigationMain): use Timber\Menu sub-namespace instead of Ti…
Browse files Browse the repository at this point in the history
…mber (#354)

* refactor(NavigationMain): use Timber\Menu sub-namespace instead of Timber

* fix(NavigationMain): fixed a linting error
  • Loading branch information
timohubois authored Aug 26, 2021
1 parent c7a763f commit 70f7e75
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Components/NavigationMain/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Flynt\Components\NavigationMain;

use Timber;
use Flynt\Utils\Asset;
use Timber\Menu;

add_action('init', function () {
register_nav_menus([
Expand All @@ -12,7 +12,7 @@
});

add_filter('Flynt/addComponentData?name=NavigationMain', function ($data) {
$data['menu'] = new Timber\Menu('navigation_main');
$data['menu'] = new Menu('navigation_main');
$data['logo'] = [
'src' => get_theme_mod('custom_header_logo') ? get_theme_mod('custom_header_logo') : Asset::requireUrl('Components/NavigationMain/Assets/logo.svg'),
'alt' => get_bloginfo('name')
Expand Down

0 comments on commit 70f7e75

Please sign in to comment.