=== Embed Calculators and Tools by EvvyTools ===
Contributors: 137foundry
Tags: calculator, embed, shortcode, tools, converter
Requires at least: 5.6
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 2.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Embed 180+ online calculators and tools on your WordPress site with a single shortcode. Auto-resizing, theme-aware, and always up to date.

== Description ==

**Embed Calculators and Tools by EvvyTools** lets you drop any calculator or converter from [EvvyTools](https://evvytools.com) into any WordPress post, page, or widget using a one-line shortcode. The iframe auto-resizes, supports light/dark/auto themes, and is mobile-friendly.

Tools are loaded live from evvytools.com — when new calculators are published there, they automatically appear inside the WordPress admin picker. You never need to update the plugin to get new tools.

= Features =

* 180+ calculators and tools across 10+ categories
* One-click shortcode copy from a searchable admin picker
* Auto-resizing iframes — no fixed heights, no scrollbars
* Light, dark, and auto theme modes
* Works in Gutenberg, Classic Editor, page builders, widgets
* Responsive — works on phones, tablets, and desktops
* No account or API key required
* Translation-ready
* Accessible (WCAG 2.1 AA): titled iframes, keyboard-friendly admin UI

= Tool Categories =

* **Personal Finance** — Compound interest, mortgage, retirement, budget, debt payoff, savings, and more
* **Health & Fitness** — BMI, calorie, macro, body fat, TDEE, pace, sleep
* **Everyday Calculators** — Tip, percentage, age, date, fuel cost, electricity
* **Dev & Tech** — JSON formatter, UUID generator, JWT decoder, regex tester, hash, QR code
* **Cooking & Kitchen** — Unit converter, recipe scaler, air fryer, baking substitutions
* **Math & Science** — Statistics, scientific, projectile, density, Ohm's law
* **Home & Real Estate** — Mortgage, paint, flooring, drywall, concrete, renovation ROI
* **Writing & Content** — Word counter, headline analyzer, reading level, grammar checker
* **Freelance & Business** — Freelance rate, invoice, margin, SaaS pricing, proposal analyzer

And many more.

= How It Works =

1. Install and activate the plugin.
2. Go to **Settings → Calculator Embeds** to browse the full tool library.
3. Click **Copy Shortcode** next to any tool.
4. Paste the shortcode into any post, page, or widget.

= Example Shortcodes =

`[evvyct_embed slug="compound-interest-calculator" category="personal-finance"]`

`[evvyct_embed slug="bmi-calculator" category="health-fitness" theme="dark"]`

`[evvyct_embed slug="json-formatter" category="dev-tech" width="100%" height="auto"]`

= Privacy =

This plugin loads a public JSON list of tool names/slugs from https://evvytools.com/api/tools.php for the admin picker. Tool iframes load pages from https://evvytools.com. No personal data is sent from your site to EvvyTools, and no analytics or tracking scripts are added to the front end of your WordPress site by this plugin.

== Installation ==

= From within WordPress =

1. Go to **Plugins → Add New**.
2. Search for "Embed Calculators and Tools by EvvyTools".
3. Click **Install Now**, then **Activate**.
4. Go to **Settings → Calculator Embeds**.

= Manual upload =

1. Download the plugin zip.
2. In WordPress, go to **Plugins → Add New → Upload Plugin** and select the zip.
3. Activate the plugin.
4. Go to **Settings → Calculator Embeds**.

== Frequently Asked Questions ==

= Do I need an account with EvvyTools? =

No. The plugin and all tools it embeds are available with no account, no API key, and no signup.

= Does the plugin need updates when new tools launch? =

No. Tools load live from evvytools.com. When a new calculator is published there, it automatically appears in the admin picker (cached up to 6 hours — use the **Refresh library** button to force a reload).

= Where is my data stored? =

Users enter values directly into the embedded tool iframe. Those values never pass through your WordPress site. Most tools compute results entirely client-side. See EvvyTools' privacy policy at https://evvytools.com/privacy-policy/ for specifics.

= Does it work with Gutenberg / block editor? =

Yes. Paste the shortcode into a Shortcode block, a Paragraph block, or any block that renders shortcodes.

= Does it work with page builders (Elementor, Divi, Bricks, etc.)? =

Yes. Add a shortcode element / widget and paste the shortcode.

= Can I force light or dark mode? =

Yes: `theme="light"` or `theme="dark"` on the shortcode. Default is `auto` (follows the visitor's OS preference).

= Can I set a fixed height? =

Yes: `height="600"`. Without this, the iframe auto-resizes to match its content.

= Does this plugin slow down my site? =

No. The iframe loads with `loading="lazy"` and only fetches when it's near the viewport. The small resize-listener script runs once per page, regardless of how many embeds are on it.

== Screenshots ==

1. The admin tool picker — browse and search the full EvvyTools library, copy a shortcode with one click.
2. An embedded calculator on a live WordPress post with auto-resize.
3. Dark mode support — the embedded tool matches your theme choice.

== Changelog ==

= 2.0.0 =
* First public release on WordPress.org.
* Single shortcode `[evvyct_embed]` with the unique `evvyct_` prefix throughout (functions, classes, constants, options, transients, AJAX actions, nonces, JS globals).
* Searchable admin picker at **Settings → Calculator Embeds** with one-click shortcode copy and a manual library-refresh button.
* Server-side API proxy with a 6-hour transient cache — fewer external requests, faster picker.
* Auto-resizing iframes (postMessage-based), light/dark/auto theme support, responsive layout.
* Accessibility: titled iframes, keyboard-navigable admin UI, dark-admin color scheme support.
* Translation-ready with `.pot` file under `/languages/`.
* `evvyct_embed_url` and `evvyct_iframe_html` filters for clean extension by companion plugins.
