get('order_mode') === 'test') { $id = 'fluent_cart_test_mode'; $menuTitle = __('Test Mode', 'fluent-cart'); $color = 'color: #F58E07;'; } $logo = Vite::getAssetUrl('images/logo/logo-white.svg'); $title = '
Logo' . $menuTitle . '
'; // Parent node (with class) $wp_admin_bar->add_node([ 'id' => $id, 'title' => $title, 'href' => false, // disables direct link to act as dropdown 'meta' => [ 'class' => $id, 'title' => __('FluentCart', 'fluent-cart') ] ]); // Child: Store Settings $wp_admin_bar->add_node([ 'id' => $id . '_orders', 'title' => __('View Orders', 'fluent-cart'), 'href' => URL::getDashboardUrl('orders'), 'parent' => $id ]); $wp_admin_bar->add_node([ 'id' => $id . '_products', 'title' => __('View Products', 'fluent-cart'), 'href' => URL::getDashboardUrl('products'), 'parent' => $id ]); $wp_admin_bar->add_node([ 'id' => $id . '_settings', 'title' => __('Store Settings', 'fluent-cart'), 'href' => URL::getDashboardUrl('settings/store-settings/'), 'parent' => $id ]); // Child: View Orders } }