=== MenuVerse – Mobile Menu, Mega Menu & Bottom Navigation Builder ===
Contributors: wpxero
Tags: mobile menu, hamburger menu, bottom navigation, responsive menu, navigation
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 0.2.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A lightweight WordPress mobile menu and bottom navigation bar that reads the menus you already built. Off-canvas hamburger menu, app-style tab bar, live preview, and zero frontend weight when a module is off.

== Description ==

**MenuVerse** is a modular WordPress navigation plugin for sites that need a proper **mobile menu**, a **bottom navigation bar**, and room to grow into **mega menus** — without rebuilding menus in a second admin screen.

It reads the menus you already maintain under **Appearance → Menus** and the block **Navigation** menus WordPress stores as posts. Nothing is copied. You keep editing menus where you always did; MenuVerse only controls how they appear on the frontend.

Switch a module off and it registers no hooks, enqueues no assets, and outputs nothing. A page with no MenuVerse menu on it downloads no MenuVerse bytes.

= Available now =

**Mobile Menu** — a responsive **hamburger menu** and off-canvas panel for phones and small tablets.

* Slides in from the left or the right; overlays the page (full screen and push are Pro).
* Animated trigger icons (bars, dots) with a squeeze transition; spin and arrow are Pro.
* Optional top bar with your logo or site title; custom wording, sticky and hide-on-scroll are Pro.
* Accordion submenus that open at the branch the visitor is already on.
* Body scroll lock, focus trap, and focus return for keyboard and screen-reader users.
* Configurable breakpoint, and a choice of menu per module.
* Pro adds the search field, a row of social profile links, free-text inside the panel, swipe-to-close, page visibility rules, and hiding your theme’s own menu on small screens.

**Bottom Menu** — an app-style **bottom navigation bar** pinned to the viewport on mobile.

* Four buttons free, with a **More** drawer for overflow items or a bar that scrolls sideways; more buttons with Pro.
* Built-in icon library — no icon font, no CDN, no external requests. Pro can use your own images instead, including a second image for the current page.
* Buttons can link to a URL, open a page, or launch a search sheet scoped to the site, WooCommerce products, or Easy Digital Downloads. Pro adds WhatsApp, phone, Popup Maker, and a slide-up panel of your own content.
* Five ways to mark the current page: colour, pill, top line, underline, or a raised button — the line and the raised button are Pro.
* Optional per-button labels above or below the icon, custom badges, and safe-area padding for notched phones.
* Ready-made looks to start from, then fine-tune colours, spacing, and behaviour in a step-by-step dashboard.
* Pro adds the finishes beyond one colour (gradient, frosted glass, a background picture, shadows, padding, alignment), a second palette for dark mode, per-button colours, live cart and wishlist counts, per-button visibility by role or sign-in state, and page rules.

= Coming soon =

**Mega Menu** — horizontal navigation whose items open full-width panels you build with blocks, folding to an accordion on small screens. Already visible in the dashboard as a preview of what is next.

= Works with the menus and tools you already use =

* **Classic menus** (`nav_menu`) and **block Navigation menus** (`wp_navigation`) — both normalised to the same tree shape.
* Per-item extras in the menu editor: icon, badge, mega-panel link, and hide-on-mobile or hide-on-desktop flags.
* **WooCommerce** — live cart count badge on a bottom-bar button (Store API).
* **YITH WooCommerce Wishlist** — live wishlist count badge.
* **Easy Digital Downloads** — scope a search button to downloads only.
* **Popup Maker** — open a popup from a bottom-bar button.

= Four ways to place any menu =

Every module supports the same four entry points, all rendering through one pipeline so they never drift apart:

1. **Block** — drop a MenuVerse block in the Site Editor, a page, or a template.
2. **Shortcode** — `[menuverse_mobile_menu]` or `[menuverse_bottom_menu]`.
3. **PHP template tag** — `menuverse_the_mobile_menu()` or `menuverse_render( 'bottom_menu' )`.
4. **Automatic insertion** — optional; off by default so nothing is silently injected into your theme.

= Dashboard built for non-developers =

* One admin screen with a **live phone preview** beside every setting step.
* Guided onboarding on first run: pick a module, choose a menu, place it, save.
* Import and export settings as JSON under **MenuVerse → Tools** (settings only — menus and media stay on the site).
* Optional **Delete data on uninstall**, off by default.

= Fast, accessible, and self-contained =

* **Conditional loading.** Assets enqueue only when markup is actually rendered.
* **Tiny.** Each frontend module is under 6 KB gzipped (JavaScript and CSS combined); most are under 4 KB.
* **Vanilla JavaScript** on the frontend — no jQuery, no React, no framework.
* **Accessible.** Correct ARIA roles, keyboard navigation, focus management, and `prefers-reduced-motion` on every animation.
* **RTL-ready.** Styled with CSS logical properties; one stylesheet works in both directions.
* **Self-hosted.** Icons are SVG geometry shipped with the plugin. No CDN calls anywhere.

= Extensible =

Module registration, settings schemas, the render pipeline, REST routes under `menuverse/v1`, and dashboard SlotFill points are documented in `docs/extension-points.md` for companion plugins and a Pro tier.

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/menuverse/` or install it from the WordPress plugin directory.
2. Activate **MenuVerse** through the **Plugins** screen.
3. Open **MenuVerse** in the admin sidebar and follow the short setup walkthrough.
4. Place your menu with a block, shortcode, template tag, or automatic insertion.

**Shortcodes**

`[menuverse_mobile_menu]`

`[menuverse_bottom_menu]`

**Template tags**

`<?php menuverse_the_mobile_menu(); ?>`

`<?php menuverse_the_bottom_menu(); ?>`

== Frequently Asked Questions ==

= Do I have to rebuild my menus in MenuVerse? =

No. MenuVerse displays menus you already built — classic menus under **Appearance → Menus** and block Navigation menus. It never copies or replaces your menu storage.

= How do I add a hamburger menu to my WordPress site? =

Enable the **Mobile Menu** module, pick one of your existing menus, then either turn on automatic insertion or place the MenuVerse Mobile Menu block (or `[menuverse_mobile_menu]` shortcode) where you want the button to appear. Set the breakpoint to match when your theme’s desktop menu should take over.

= What is a bottom navigation bar and when should I use one? =

A bottom navigation bar — sometimes called a tab bar or mobile footer menu — keeps your most important links thumb-reachable on phones, the way native apps do. MenuVerse’s bottom bar supports icons, labels, a More drawer, and action buttons like search, call, and chat alongside ordinary links.

= Will MenuVerse slow my site down? =

No, when configured normally. Disabled modules load nothing. Enabled modules enqueue assets only on pages where they actually render. With every module off, MenuVerse adds zero bytes to the frontend.

= Does it work with my theme? =

Yes. MenuVerse outputs scoped markup and its own CSS custom properties, so global theme rules for `button` and `a` do not override it. You can also hide your theme’s menu on small screens when the mobile menu takes over.

= Does it work with WooCommerce? =

Yes. When WooCommerce is active, a bottom-bar button can show a live cart count badge fetched from the WooCommerce Store API — safe under full-page caching because the count is per visitor.

= Does it work with page builders? =

MenuVerse registers native WordPress blocks, so it works anywhere blocks or shortcodes work — including the Site Editor, block themes, and most page builders that respect core blocks or shortcodes.

= Can I show the menu only on certain pages? =

Yes, with Pro. Both the mobile menu and bottom bar support show-everywhere, only-on-these-pages, and everywhere-except rules when using automatic insertion, and page rules are part of MenuVerse Pro. A menu you place yourself with a block or shortcode always shows where you put it, on any tier.

= Can I move settings to another site? =

Yes. Under **MenuVerse → Tools**, export your settings as JSON and import them on another site. Menus, mega panel content, and media are not included — a settings file cannot carry them meaningfully across sites.

= Does uninstalling remove my settings? =

Only if you choose to. Turn on **Delete data on uninstall** under Tools before deleting the plugin. It is off by default so uninstalling never destroys your configuration by surprise.

= Is MenuVerse free? =

Yes. Free builds a menu that works: an off-canvas panel that opens, closes, and looks like the site it is on, and a bottom bar of up to four buttons with an icon, wording, a colour, a height, a corner radius, and a marker for the current page.

MenuVerse Pro, a separate plugin, adds where a menu appears and who sees it (page rules, per-button visibility by role or sign-in state), what a button can do besides open a link (WhatsApp, phone, Popup Maker, a slide-up panel), every finish beyond one colour (gradient, frosted glass, a background picture, shadows, dark mode, per-button colours), the extras inside the mobile panel (search, social links, free text), live cart and wishlist counts, and the fifth button onwards.

Your saved settings are never deleted when Pro is inactive, and nothing is truncated in the database. Gated options simply fall back to their defaults on the frontend, and rows past the free limit stay stored and editable, until a licence is active.

= Is MenuVerse accessible and RTL-ready? =

Yes. Modal surfaces use focus traps and return focus to the trigger when closed. Animations honour `prefers-reduced-motion`. Layout uses CSS logical properties so the same stylesheet works for left-to-right and right-to-left sites.

= Where will the mega menu panel content be stored? =

Each mega panel will be a dedicated post type entry edited with the block editor inside the MenuVerse dashboard, giving you revisions and the full block library. The mega menu module is marked **Coming soon** in the dashboard until it ships.

== Screenshots ==

1. The MenuVerse dashboard with module cards and a live phone preview.
2. The mobile menu off-canvas panel open on a phone frame.
3. The bottom navigation bar with icons, labels, and a More drawer.
4. Bottom bar settings with ready-made looks and step-by-step controls.
5. The mobile menu trigger and optional top bar on a narrow screen.
6. Menu item extras — icon and badge — in the classic menu editor.

== Changelog ==

= 0.2.0 =
* Bottom bar: a slide-up panel of your own content behind a button, with the same one-at-a-time, Escape-to-close and focus-return behaviour as the search sheet.
* Bottom bar: your own images instead of the bundled icons, with a separate image or library icon for the current page.
* Bottom bar: per-button visibility — everyone, signed in, signed out, or named roles, read from the site’s own roles. Hidden buttons are left out of the markup, not hidden with CSS, so cached pages cannot leak them.
* Bottom bar: a sideways-scrolling mode as an alternative to the More drawer.
* Bottom bar: background picture with an optional colour wash, named shadow depths with their own colour, inline padding, item alignment, an explicit stacking order, and an icons-off option.
* The free and Pro split now lives in one file and is stamped onto the settings schemas, so a setting can be free while only some of its answers need a licence, and a list can render its first rows free.
* "Create a menu" now points at the site editor’s navigation screen on block themes, instead of a screen core never registered.
* Dashboard: explanations moved into hints on their labels, groups collapse into fewer steps (the mobile menu goes from eight to five), one status chip per module card, and paid options are shown, disabled, and named rather than hidden.
* Dashboard: the live preview can be switched off, remembered per browser rather than saved to the site.
* Fixed: "(needs Pro)" printed as visible text beside every locked option.
* Fixed: turning icons off while labels were already off left a row of blank buttons.
* Continuous integration on PHP 7.4 and 8.2 plus Node 20, with render and Pro-gating tests.

= 0.1.0 =
* First public release.
* Mobile Menu module: off-canvas hamburger menu with accordion submenus, search, social links, and swipe to close.
* Bottom Menu module: app-style bottom navigation bar with More drawer, action buttons, and page visibility rules.
* Dashboard with live preview, onboarding walkthrough, and settings import/export.
* Classic and block Navigation menu sources with per-item icon and badge extras.
* WooCommerce, YITH Wishlist, EDD, and Popup Maker integrations for bottom-bar buttons.
* Gutenberg blocks, shortcodes, template tags, and optional automatic insertion for each module.

== Upgrade Notice ==

= 0.2.0 =
Adds bottom-bar panels, image icons, per-button visibility, and a sideways-scrolling bar, and moves the free/Pro line into one place. Existing settings are kept as they are; some options that were previously unrestricted now need MenuVerse Pro to take effect on the frontend. Nothing is removed from the database.

= 0.1.0 =
First public release. Enable Mobile Menu and/or Bottom Menu from the MenuVerse dashboard.
