=== Hubu Panel ===
Contributors: hubupro
Tags: user dashboard, login, registration, user profile, woocommerce my account
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.0
Stable tag: 1.0.1
License: GPLv3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html

A front-end dashboard for your members, with branded login and registration and a WooCommerce My Account area that finally matches your design.

== Description ==

Hubu gives the logged-in half of your site the same care as the public half. Instead of dropping members into the WordPress admin, it builds a front-end dashboard on your own pages, with login and registration screens that look like they belong to your brand.

Everything is organised into modules you switch on from one screen, so a site that only needs a nicer login page never loads the rest.

= User Panel =

A complete front-end dashboard for your members: profile editing, activity and security widgets, all styled to match your brand.

The panel menu is yours to arrange. Rename, reorder or switch off its endpoints, choose who sees each one by role, pick an icon, and add your own content to an endpoint — no template editing required.

= Authentication =

Branded login, registration and password-recovery flows with strong-password rules, rate limiting, an international phone field, and a form builder to choose, order and label the registration fields.

= WooCommerce =

Merges the WooCommerce My Account area into the user panel: orders, downloads and addresses become native endpoints with matching icons and styling. WooCommerce's own hooks keep firing, so extensions that add to My Account keep working.

This module only appears when WooCommerce is active.

= Asset Cleanup =

Blocks theme and plugin CSS/JS from the panel and login pages, so your layout stays pixel-perfect on any theme and loads noticeably faster.

= Built to be extended =

Every module exposes filters under the `hubu/` prefix — dashboard boxes, panel menus, endpoint providers, notification templates and email views are all filterable. Notifications are delivered through a queue rather than during the request that triggered them.

= Translation ready =

Every string ships translatable in the `hubu-panel` text domain, with translations loaded from `/languages`.

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/`, or install it through **Plugins → Add New**.
2. Activate **Hubu Panel** through the **Plugins** screen.
3. Open **Hubu** in the admin menu and enable the modules you want.
4. Under **Hubu → Settings → Pages**, choose which page hosts the user panel and which hosts login and registration.

Hubu creates those pages for you on activation if they do not exist yet.

== Frequently Asked Questions ==

= Does it work with my theme? =

Yes. The panel and authentication screens render on ordinary pages and bring their own styles. If a theme's CSS still interferes, enable the Asset Cleanup module, which stops theme and plugin stylesheets from loading on those screens.

= Do I need WooCommerce? =

No. WooCommerce is optional. When it is active, the WooCommerce module folds My Account into the panel; when it is not, that module stays hidden.

= My site is behind Cloudflare and rate limiting behaves oddly. What do I do? =

By default Hubu identifies visitors only by `REMOTE_ADDR`, because headers like `X-Forwarded-For` can be set by anyone and trusting them would let a caller walk past per-IP limits. Behind a reverse proxy that means every visitor looks like the proxy, so they share one bucket.

Tell Hubu which header your proxy sets, and only then is it trusted:

`add_filter( 'hubu/trusted_proxy_headers', function () { return array( 'HTTP_CF_CONNECTING_IP' ); } );`

= Does uninstalling delete my data? =

No. Deleting the plugin removes its files and cancels its scheduled jobs, but leaves your settings, user data and tables in place, so reinstalling picks up where you left off.

If you do want a clean removal, opt in from a must-use plugin — ordinary plugins are not loaded while WordPress runs an uninstall:

`add_filter( 'hubu_clear_data_on_uninstall', '__return_true' );`

= Can I translate it? =

Yes. All strings use the `hubu-panel` text domain. Name your files `hubu-panel-{locale}.po` / `.mo` (for example `hubu-panel-fa_IR.mo`) and drop them in `/wp-content/languages/plugins/` so they survive plugin updates.

= Where is the source code of the minified scripts? =

It ships with the plugin. The minified bundles are built with webpack from the readable sources in `assets/admin/src`, `assets/front/src` and each module's `assets/src` folder. To rebuild them, run `npm install` and then `npm run build` in the plugin folder. The plugin's own stylesheets and other scripts ship unminified.

= Which third-party libraries does it include? =

[Bootstrap](https://github.com/twbs/bootstrap), [Popper](https://github.com/floating-ui/floating-ui/tree/v2.x), [Hammer.js](https://github.com/hammerjs/hammer.js), [Node Waves](https://github.com/fians/Waves), [Algolia Autocomplete](https://github.com/algolia/autocomplete), [Pickr](https://github.com/simonwep/pickr), [perfect-scrollbar](https://github.com/mdbootstrap/perfect-scrollbar), [toastr](https://github.com/CodeSeven/toastr) and [intl-tel-input](https://github.com/jackocnr/intl-tel-input), all MIT; [jQuery BlockUI](https://github.com/malsup/blockui) (MIT or GPL); [Font Awesome Free](https://github.com/FortAwesome/Font-Awesome) (MIT code, SIL OFL 1.1 fonts, CC BY 4.0 icons); [Tabler Icons](https://github.com/tabler/tabler-icons) (MIT); [Leaflet](https://github.com/Leaflet/Leaflet) (BSD-2-Clause); and [Web Font Loader](https://github.com/typekit/webfontloader) (Apache-2.0).

= Does Hubu add a credit link to my site? =

Not unless you ask for one. A "Powered by Hubu" link in the panel footer appears only after you turn it on under Settings › Panel › Footer.

= Where do I get support? =

Use the support forum on this plugin's WordPress.org page, or visit [hubu.pro](https://hubu.pro/).

== External services ==

Hubu Panel works on its own. It contacts the services below only in the situations described. It performs no license checks and gets its updates from WordPress.org.

= hubu.pro: optional account connection =

Hubu's own service, used only if you connect your site to a hubu.pro account.

* **Connecting:** when you click to connect in the Hubu admin screens, your browser goes to your account page on hubu.pro (`https://hubu.pro/my-account/`) to sign in, and your site URL is included so the account can be linked back to the site.
* **Disconnecting:** when you disconnect the site, or deactivate the plugin while the site is connected, the plugin sends your Hubu username, the site's API key and the site URL to hubu.pro's API, so the site is unlinked from your account.

Nothing is sent to hubu.pro unless you connected the site. The service is provided by Hubu: [terms of service](https://hubu.pro/licence-terms/), [privacy policy](https://hubu.pro/privacy-policy/).

= Gravatar: profile pictures =

The panel header and the account page show each member's profile picture through WordPress's own avatar functions. Unless another plugin supplies local avatars, WordPress serves those pictures from Gravatar: the visitor's browser loads the image from gravatar.com, which receives a hash of the member's email address and the usual request data, such as the visitor's IP address. This happens whenever a panel page with a profile picture is displayed. The service is provided by Automattic: [terms of service](https://gravatar.com/tos), [privacy policy](https://automattic.com/privacy/).

= ipapi.co: country detection for phone fields (off by default) =

Phone fields preselect the visitor's country. By default the country is detected on your server only, and nothing is sent anywhere. If you choose a "Detection source" that uses the browser (in a phone field's options, in the registration or account form builder), the visitor's browser asks ipapi.co for its country when a form with a phone field is shown; ipapi.co receives the visitor's IP address. The answer is cached in the browser for a week. The service is provided by ipapi.co: [terms of service](https://ipapi.co/terms/), [privacy policy](https://ipapi.co/privacy/).

== Changelog ==

= 1.0.1 =
* Fix: the screen shown right after the first activation ended on a "Sorry, you are not allowed to access this page" error. It now opens the Hubu dashboard.
* Fix: login, registration and password-recovery validation, OTP code entry and the registration consent checkbox.

= 1.0.0 =
* First public release.
* User Panel: front-end dashboard with configurable widgets, an arrangeable menu and role-based visibility.
* Authentication: branded login, registration and password recovery, with a registration form builder.
* WooCommerce: My Account endpoints rendered inside the user panel.
* Asset Cleanup: stops theme and plugin assets from loading on panel and authentication screens.
* Queued notifications with filterable email templates.
* Translations: German, French, Spanish, Arabic, Turkish and Persian. A regional locale such as es_MX, de_AT or fr_CA reads the translation of its language.

== Upgrade Notice ==

= 1.0.1 =
Fixes an error on the first screen after activating the plugin.

= 1.0.0 =
First public release.
