rename to children_group

This commit is contained in:
Edward Yang 2022-08-15 14:57:10 +08:00
parent 4737893f59
commit 1da21fc8bb
3 changed files with 4 additions and 5 deletions

View File

@ -52,7 +52,6 @@ class ShareViewData
View::share('design', request('design') == 1);
View::share('languages', LanguageRepo::enabled());
View::share('shop_base_url', shop_route('home.index'));
View::share('categories', hook_filter('header.categories', CategoryRepo::getTwoLevelCategories()));
View::share('footer_content', hook_filter('footer.content', FooterRepo::handleFooterData()));
View::share('menu_content', hook_filter('menu.content', MenuRepo::handleMenuData()));
}

View File

@ -41,8 +41,8 @@ class MenuRepo
$menu['name'] = $menu['name'][$locale] ?? '';
$menu['badge']['name'] = $menu['badge']['name'][$locale] ?? '';
if ($menu['childrenGroup']) {
$menu['childrenGroup'] = self::handleChildrenGroup($menu['childrenGroup']);
if ($menu['children_group']) {
$menu['children_group'] = self::handleChildrenGroup($menu['children_group']);
}
$menus[$index] = $menu;
}

View File

@ -23,10 +23,10 @@ class Bootstrap
*/
private function addLatestProducts()
{
add_filter('header.categories', function ($data) {
add_filter('menu.content', function ($data) {
$data[] = [
'name' => trans('LatestProducts::header.latest_products'),
"url" => plugin_route('latest_products'),
"link" => plugin_route('latest_products'),
];
return $data;
});