=== CM GEO Core — Local SEO & Schema Injector ===
Contributors: blacktiewms
Tags: schema, local seo, geo, faq schema, json-ld
Requires at least: 5.8
Tested up to: 7.0
Stable tag: 1.1.0
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Inject FAQPage and LocalBusiness schema into any page using a simple shortcode. GEO-ready. No coding required.

== Description ==

**CM GEO Core** is a lightweight, data-safe WordPress plugin that injects two of the most powerful schema types — **FAQPage** and **LocalBusiness** — directly into your pages using a single shortcode. Built for the era of AI-powered search, it helps your content get found, read, and cited by Google, ChatGPT, Perplexity, and other generative search engines.

Most businesses have FAQ pages. Very few have properly structured schema markup that AI tools can actually read and cite. CM GEO Core bridges that gap — with no coding required and no risk of losing your work.

= What makes v1.1.0 different =

Earlier versions of CM GEO Core deleted all your saved data when the plugin was deactivated or removed. That is no longer the case. Starting with v1.1.0, **your data is fully preserved** — deactivate, delete, reinstall, and your groups come back exactly as you left them. You are always in control.

= What it does =

* Injects valid **FAQPage JSON-LD schema** so Google and AI tools can read your Q&A content directly
* Injects **LocalBusiness schema** with address, GPS coordinates, and service area description
* Displays a clean, collapsible **FAQ accordion** visible to human visitors
* Supports **multiple page groups** — create independent schema profiles for each page of your site
* Manage all your groups from a single **dropdown selector** — no more typing group names manually
* **Delete Group button** — remove any specific group's data permanently, on demand, with confirmation
* Uses your site's **favicon** as the accordion trigger icon automatically
* Allows **custom trigger label** per group

= How it works =

1. Go to **CM GEO Core** in your WordPress admin
2. Type a new group name (e.g. `servicepage`, `blogpage`, `homepage`) or select an existing one from the dropdown
3. Click **Load Group** — existing data loads instantly; new names start with a fresh form
4. Fill in your business details and FAQ pairs
5. Copy the shortcode shown: `[cm_geo_core group="group-name"]`
6. Paste it anywhere in your page or post
7. Click **Save Group** — done, schema is live

= Why GEO, not just SEO? =

GEO stands for **Generative Engine Optimization** — optimizing your content to be cited by AI-powered search tools. As Google, ChatGPT, and Perplexity increasingly answer questions directly from structured data, having proper schema markup is no longer optional. CM GEO Core makes it simple, safe, and manageable for any WordPress site owner.

= Features =

* Zero dependencies — no jQuery, no external libraries
* Works with any WordPress theme including Elementor, Divi, Beaver Builder
* Multiple group profiles — one plugin, unlimited pages
* Group dropdown selector — quickly switch between and edit existing groups
* Delete Group button — remove a specific group's data on demand, anytime
* **Data-safe by design** — deactivating or deleting the plugin never erases your saved groups
* Reinstall-friendly — your groups are automatically restored when you reactivate the plugin
* On-screen data retention reminder — always visible so you never lose work accidentally
* New group indicator — clear message when you load a group name that does not exist yet
* Validated against Google Rich Results Test
* FAQPage schema eligible for rich result snippets in Google Search

== Installation ==

1. Upload the `cm-geo-core` folder to `/wp-content/plugins/`
2. Activate the plugin through the **Plugins** menu in WordPress
3. Navigate to **CM GEO Core** in your admin sidebar
4. Create your first group, fill in your data, and paste the shortcode

== Frequently Asked Questions ==

= Does this work with page builders like Elementor? =

Yes. Paste the shortcode `[cm_geo_core group="group-name"]` into any HTML or Shortcode widget in Elementor, Divi, or any other builder.

= Can I have different FAQ schemas on different pages? =

Yes — that is the core feature. Create a different group name for each page and each one is completely independent. Use the dropdown in the admin panel to quickly switch between and edit your saved groups.

= Will this conflict with Rank Math or Yoast SEO? =

CM GEO Core injects schema via shortcode only on pages where you place it. It coexists cleanly with Rank Math, Yoast, and other SEO plugins.

= What happens to my data if I delete the plugin? =

Your data is preserved. Deactivating or deleting CM GEO Core does not remove your saved groups from the database. If you reinstall and activate the plugin later, your data will be available again. To permanently delete a specific group, load it in the plugin settings and use the **Delete Group** button.

== Screenshots ==

1. Admin settings panel — business profile and GEO data entry
2. FAQ pairs editor — dynamic add/remove rows
3. Frontend output — clean collapsible accordion with favicon trigger
4. Page source — valid JSON-LD schema injected cleanly

== Changelog ==

= 1.1.0 =
This release focuses on three things: keeping your data safe, making group management easier, and giving you clearer guidance throughout the plugin.

**Your data is now safe**
In previous versions, deleting or deactivating the plugin removed all your saved groups and FAQ data permanently. That was a serious risk for users who had invested time building their schema profiles. Starting with v1.1.0, your data is fully preserved in the WordPress database even if you deactivate or delete the plugin. If you ever reinstall and reactivate it, all your groups come back exactly as you left them. To permanently remove a group, simply load it and use the new Delete Group button — giving you full, intentional control.

**Easier group management**
* New: Group dropdown selector — all your existing groups appear as suggestions when you click the Group Name field; no more typing names from memory
* New: Delete Group button — appears next to Save Group when a real group is loaded; greyed out otherwise to prevent accidental use
* New: New group indicator — when you type a group name that does not exist yet, a clear message tells you it is new and guides you to fill in the form
* New: Persistent data retention notice — a friendly on-screen reminder explains that your data is safe and how to permanently delete groups if needed

**Cleaner, clearer interface**
* "Page Group Slug" renamed to "Group Name" — more meaningful for non-developers
* "Save Settings" renamed to "Save Group" — reflects exactly what the button does
* Group Shortcode banner updated to show a static placeholder format so it is always clear how to use the shortcode
* Browser autocomplete suppressed on the Group Name field to prevent confusion between saved browser history and real group suggestions

= 1.0.3 =
* Fix: Added admin/js/ directory with correct JS file path for admin functionality

= 1.0.2 =
* Fix: Admin JS now loads correctly using CM_GEO_CORE_URL constant — Add FAQ Pair button working
* Fix: Added plugin_dir_url() constant for reliable asset URL resolution

= 1.0.1 =
* Fixed: Moved inline admin JavaScript to external file loaded via wp_enqueue_script()
* Fixed: Moved inline frontend CSS to wp_add_inline_style() via wp_enqueue_style()
* Updated plugin version to 1.0.1

= 1.0.0 =
* Initial release
* FAQPage JSON-LD schema injection
* LocalBusiness schema with address and GPS coordinates
* Multi-group profile system
* Custom accordion trigger label
* Site favicon as trigger icon
* Clean uninstall

== Upgrade Notice ==

= 1.1.0 =
Group management overhaul — dropdown selector, Delete Group button, and your data is now preserved on deactivate/delete.

= 1.0.1 =
Code quality improvements — inline script and style tags replaced with proper WordPress enqueue functions.

= 1.0.0 =
Initial release of CM GEO Core.
