=== TOC Genius ===
Contributors:
Tags: table of contents, navigation, headings
Requires at least: 6.5
Tested up to: 7.1.3
Requires PHP: 7.4
Stable tag: 0.1.1
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A customizable automatic table of contents with a manual block, existing-anchor preservation, and per-post controls.

== Description ==

TOC Genius creates a table of contents from headings in the rendered article body on singular WordPress posts and pages. It uses the WordPress HTML API and preserves existing heading IDs.

Free features:

* Automatic placement before the first heading, after the first paragraph, or at the article end.
* Heading-level selection and a minimum-heading threshold.
* Five appearance presets, width, alignment, spacing, typography, custom colors, and theme inheritance.
* A manual TOC Genius block and [tocgenius] shortcode.
* Per-post placement, heading exclusions, and independent TOC labels.
* Collapse controls, numbering, section highlighting, header offsets, and basic sticky contents.
* Diagnostics explaining stored article headings and visibility decisions.

The separate TOC Genius Pro add-on adds ordered publishing rules, shared appearance templates, template portability, and adaptive navigation. The Free plugin contains informational Pro tabs on its own settings page; premium implementation is not bundled or locked in Free.

Privacy: TOC Genius does not make external requests, collect telemetry, require an account, or add front-end credit links. All plugin assets are bundled locally.

Version 0.1.1 is a maintenance beta release. Automated migration, page-builder certification, Pro checkout, licensing, and an update service are not included. Stored heading IDs are preserved; anchors generated only by another plugin need separate evaluation.

All PHP, JavaScript, and CSS source is included in the package. JavaScript uses WordPress-provided packages and has no build step.

== Installation ==

1. Upload the tocgenius folder to wp-content/plugins or upload the ZIP through Plugins > Add New > Upload Plugin.
2. Activate TOC Genius.
3. Open Settings > TOC Genius.
4. Review a staging article with at least three H2/H3 headings.

Posts are enabled by default; Pages and other public content types are opt-in. For manual placement, insert the TOC Genius block or [tocgenius] in the article body.

== Frequently Asked Questions ==

= Will Free expire or require payment? =
No. Free has no time limit, account requirement, or bundled premium features waiting to be unlocked.

= Does it rewrite stored content? =
No. New IDs are added to rendered headings only. Existing IDs and article headings are preserved. Editing a TOC label changes only the TOC text.

= What if existing IDs are duplicated? =
Those headings are excluded from the TOC and a diagnostic asks you to fix the duplicate IDs.

= What if a manual block and automatic insertion both exist? =
The manual block or shortcode owns the TOC. Only the first manual marker is used. The per-post Disable all TOCs setting suppresses both.

= Does it support every page builder? =
It parses headings in the final article HTML at the_content priority 20. Content outside that pipeline or generated later by another component may require integration work. No page-builder compatibility claim is made for this release.

= What happens when I uninstall? =
Deactivation preserves data. Uninstall also preserves data unless you explicitly enable cleanup in Settings > TOC Genius > Data cleanup. On multisite, this choice is evaluated separately for each site.

== Changelog ==

= 0.1.1 =
* Keep clicked headings below a measured sticky TOC; fall back to inline when there is too little reading space.
* Insert automatic TOCs outside hidden and excluded containers.

= 0.1.0 =
* First beta release of the Free plugin.

== Upgrade Notice ==

= 0.1.1 =
Corrects sticky navigation and hidden-content placement. Update Free before updating the Pro add-on.

= 0.1.0 =
First beta release. Evaluate on staging before enabling across a live site.
