=== Gremio Kit ===
Contributors: farowp
Tags: block-patterns, trades, quote, whatsapp, home-page
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.1
Stable tag: 0.4.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Pick a trade and the plugin builds the home page with the Gremio design, the pages its menu points to, a quote form and a WhatsApp button.

== Description ==

Gremio Kit is the companion plugin for the Gremio theme (a block theme for trades). It automates the
boring part of getting a trade website going, and then gets out of the way.

With one click you choose one of the eight trades the theme covers — plumbing, electrical work,
cleaning, locksmithing, heating and air conditioning, renovation, painting and decorating, and
carpentry — and the plugin:

* Builds the home page with the design of that trade, which comes from the theme's own patterns.
* Creates the pages the theme menu points to (services, who comes, reviews, area and contact), with
  the content of the theme's own pieces inside.
* Builds a normal WordPress menu linking to those pages, with the labels written in the language of
  your site. It is yours: rename it, reorder it or delete it whenever you like.
* Puts the quote form inside the contact piece, where the theme leaves an empty box on purpose.
* Sets that page as your home page (Settings → Reading) and moves the old home page to the trash
  (recoverable, never deleted for good).
* Leaves everything it created noted down, so a single **Undo** button removes it again. A page or a
  menu the plugin did not create is never touched.

= Anything it creates is in the language of your site =

The pages and the menu are written in the language of your website (Settings → General → Site
Language), not in the language of the person pressing the button. If you run your site in Spanish but
you use the admin in another language, the pages and the menu still come out in the language of the
site. The plugin brings Spanish and Catalan; for any other language it falls back to English until a
translation is added.

= A panel of its own, by function =

Everything lives under one **Gremio Kit** menu, with a separate screen for each job:

* **Trades** — the eight trades, each with its own picture, and the button that applies it.
* **Quote form** — where requests are sent, the subject of the email, the thank-you message, the
  privacy policy link and the contact details that show next to the form.
* **WhatsApp** — the number, the message the chat starts with, and whether the button shows on
  phones, on computers or on both.
* **Requests** — everything the form has collected, with an “answered” tick you set as you deal
  with them, and a count of the ones still pending.
* **Help** — how it all works, in four steps.

It also adds two things the theme leaves out:

* **A quote form** made by the plugin itself: name, phone, trade, message and consent (with a link
  to your privacy policy). It uses a nonce, cleans and escapes everything, and has simple anti-spam
  (a hidden field and a minimum time on the page). Every request is saved on your website as a
  private entry *before* the email is sent, so nothing is lost if the email fails.
* **A floating WhatsApp button**: a plain `wa.me` link with a message you choose. No third-party
  requests until someone taps it. You decide whether it shows on phones, on computers or on both.
  Leave the number empty and the button is not shown.

Everything is in English and translated into Spanish (and Catalan). No third-party services, no
tracking, no JavaScript needed for the form to work.

= License =

The whole plugin is free software, released under the GNU General Public License, version 2 or any
later version. There is no premium version, no account and no service behind it.

== Installation ==

1. Upload the `gremio-kit` folder to `/wp-content/plugins/`, or install the zip from Plugins → Add New → Upload Plugin.
2. Activate the plugin.
3. Go to **Gremio Kit → Trades**, choose your trade and press **Apply this trade**.
4. Fill in your email address and your WhatsApp number in the other tabs and save.

Gremio Kit works with the **Gremio theme and no other**: that is where the page designs come from.
It checks the theme and, if Gremio is not the active theme, it does not touch your content at all.
If you activate the plugin without Gremio, it activates cleanly, touches nothing and tells you why in
its own panel and on the plugins list; if you switch the theme later, the plugin simply stops acting
until Gremio is back.

== Frequently Asked Questions ==

= Does it delete my current home page? =

No. It moves it to the trash, where you can recover it from Pages → Trash. It is never deleted for good.

= Do I need the Gremio theme? =

Yes. Gremio Kit is the companion plugin for Gremio, and the page designs come from that theme. It
checks the theme before touching anything: with any other theme active it does not apply a trade, it
does not create pages and it does not build a menu, so nothing on your site can be broken. If you
activate the plugin while another theme is active, it activates cleanly, touches nothing and tells you
why; and if you change the theme later, the plugin simply stops acting until Gremio is back.

= What happens if I switch to another theme? =

Nothing is lost. The plugin notices and switches its content actions off: the **Trades** screen stays
visible, but with a warning and the “Apply this trade” buttons disabled. Put Gremio back and
everything works again.

= Where are the quote requests saved? =

In a private entry type of your own website, listed in the plugin's **Requests** screen. They do not
show on the site and nobody can reach them from outside.

= Does the form need JavaScript or an external service? =

No. The form is sent to the page and back, and everything is handled by WordPress itself. The plugin
makes no request to the internet: not even for a font or an image.

= Where do I set the privacy policy link? =

Leave it empty in the **Quote form** screen and the plugin uses the privacy policy page of your site
(Settings → Privacy). You can also paste a different address.

= In what language are the pages and the menu created? =

In the language of your site (Settings → General → Site Language), never in the language your admin
panel is in. If your website is in Spanish and you use the dashboard in another language, the pages
and the menu still come out in Spanish. The plugin brings Spanish and Catalan; in any other language
it falls back to English until a translation for it arrives.

= Can I undo it? =

Yes. On the **Trades** screen you will find everything the plugin created, with an **Undo** button
that removes those pages and that menu and puts your home page back as it was. Any page or menu that
was already on your site before is left exactly as it was.

= What if I already had a page at /services? =

The plugin leaves it alone. It only fills in the pages that are missing, and it never overwrites or
deletes a page it did not create.

= I had this installed under its old name. Do I have to do anything? =

No. Gremio Kit is the same plugin with a new name, and the first time you open it, it brings your
settings, your quote requests and the pages it had created over to the new names on its own. Nothing
is lost.

== Screenshots ==

1. The Trades screen in Spanish: the eight trades, each with its picture, and the one applied right now marked; underneath, the pages and the menu it created, with the button that undoes it.
2. The Quote form screen: where requests go, the thank-you message, the privacy policy link and the contact details.
3. The WhatsApp screen: the number, the message the chat starts with and where the button shows.
4. The Requests screen: everything the form has collected, with the answered ones ticked.
5. The Help screen: how it all works, in four steps.
6. The menu the plugin created for the site, seen in the WordPress menu editor: the pages it built, linked to it with the labels in the language of the site.
7. The same menu created on a site running in Catalan: the labels follow the language of the site, not of the panel.

== Changelog ==

= 0.4.1 =
* Activation no longer stops with an error when the Gremio theme is not active: the plugin activates
  cleanly, touches nothing and explains the situation in a notice (its own panel and the plugins list).
* Translation files are no longer shipped inside the plugin; translations are handled by
  translate.wordpress.org, as the directory asks. The pages and the menu the plugin builds still come
  out in the language of your site, Spanish and Catalan included.
* Nothing else behaves differently.

= 0.4.0 =
* The plugin is now called Gremio Kit (it used to be Oficios Kit). Only the name changed: the same trades, the same screens, the same everything.
* If you had the previous version, the first time you open the plugin it moves your settings, your quote requests and the pages it had created over to the new names on their own. Nothing is lost and nothing is left behind.
* Nothing else behaves differently.

= 0.3.0 =
* Applying a trade now also creates the pages the theme menu points to (services, who comes, reviews, area and contact) and a normal WordPress menu linking to them.
* The pages and the menu are written in the language of your site, not in the language of the admin panel. Spanish and Catalan included; anything else falls back to English.
* Everything the plugin creates is noted down, and the Trades screen now offers a single **Undo** button that removes it and restores your home page.
* Only what the plugin creates is ever removed: pages and menus that were already on your site are left untouched.
* With a block theme (such as Gremio) the menu is also created in the site editor, built by WordPress' own converter.
* The plugin now checks the theme before touching anything: without the Gremio theme it does not apply a trade, create pages or build a menu, and it tells you so both in its own panel and on the plugins list. Activating the plugin without Gremio deactivates it automatically with the reason.

= 0.2.0 =
* The admin panel is now split by function into five screens (Trades, Quote form, WhatsApp, Requests and Help), with a header picture and native WordPress styling.
* The contact details of the home page (phone, email, work area and opening hours) can be edited from the plugin instead of being fixed sample text.
* The quote form's consent box links to your privacy policy.
* Requests can be marked as answered, and the pending ones are counted in the menu.
* Settings are stored per screen, so saving one does not touch the other.
* The eight trade pictures now travel inside the plugin and decorate the Trades screen.

= 0.1.0 =
* First version: choose a trade, build the home page, quote form and WhatsApp button.

== Upgrade Notice ==

= 0.4.0 =
The plugin is now called Gremio Kit. Only the name changed, and your settings, your requests and the
pages it created come over on their own the first time you open it.

= 0.3.0 =
Applying a trade now also builds the pages the theme menu points to and a menu for them, in the
language of your site, and everything can be undone with one button. Nothing of yours is touched.

= 0.2.0 =
The settings from 0.1.0 are carried over on their own the first time you open the plugin. The panel
is now split into five screens.
