=== StyleTOC ===
Contributors: kitt
Tags: table of contents, navigation, headings, toc, accessibility
Requires at least: 6.4
Tested up to: 7.0
Requires PHP: 8.0
Stable tag: 0.3.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Create reusable table-of-contents styles and place them with a block, permanent shortcode, or automatic content-type rules.

== Description ==

StyleTOC creates accessible tables of contents from headings in posts and pages. The Free edition provides one clean style with block and shortcode placement. Pro adds unlimited styling, automatic placement, and per-content controls. Business adds configuration import and export.

Tocbot 4.36.4 is bundled locally, so front-end assets do not depend on an external CDN. Licensing, checkout, and paid updates are provided by Freemius; visitor content is not sent to Tocbot or Freemius.

Features include:

* A native StyleTOC block with an editor preview.
* Clean, Boxed, and Minimal starter styles.
* Permanent shortcodes that survive style-title and slug changes.
* Automatic placement by public content type.
* Per-post and per-page style overrides.
* Configurable heading levels, minimum heading count, ignored headings, smooth scrolling, and fixed-header offset.
* Keyboard-visible focus and reduced-motion support.

== Installation ==

1. Upload the generated Free or Premium `styletoc` package to `/wp-content/plugins/`, or install it through **Plugins > Add New > Upload Plugin**.
2. Activate StyleTOC.
3. Open **StyleTOC > Settings** and select the content types that should receive a TOC automatically.
4. Edit the starter styles under **StyleTOC > TOC Styles**.
5. Insert the StyleTOC block or use the permanent shortcode displayed with a style.

== Frequently Asked Questions ==

= How do I omit a heading? =

Add the `ttoc-ignore` CSS class or `data-toc-ignore` attribute to the heading.

= What happens when I rename a style? =

Its permanent shortcode remains unchanged, so existing content continues to work.

= Does uninstalling delete my styles? =

No. Data is retained by default. To remove it, enable permanent deletion under **StyleTOC > Settings > Data retention** before uninstalling.

= Does StyleTOC contact an external service? =

Yes. The Freemius SDK connects to Freemius for optional usage opt-in, paid license activation, account management, and automatic updates. Tocbot JavaScript and CSS remain bundled locally. See the StyleTOC privacy disclosure and Freemius data-practices documentation for details.

== Third-party libraries ==

Tocbot 4.36.4 is Copyright Tim Scanlin and licensed under the MIT License.

Source: https://github.com/tscanlin/tocbot/tree/v4.36.4
License: https://github.com/tscanlin/tocbot/blob/v4.36.4/LICENSE

The unminified source is included at `vendor/tocbot/tocbot.js`.

The Freemius WordPress SDK is included under GPL-2.0-or-later in `vendor/freemius`.

== Changelog ==

= 0.3.0 =

* Added Freemius licensing and automatic-update integration.
* Added restricted Free, Pro, and Business feature tiers.
* Added downgrade-safe feature enforcement and local plan simulation.
* Added Business configuration import and export.
* Added a branded plugin-details screen with feature, installation, FAQ, and changelog tabs.

= 0.2.0 =

* Added permanent style shortcode identifiers.
* Added administrator-only capabilities for TOC style management.
* Added versioned data migrations and optional uninstall cleanup.
* Added the StyleTOC block and editor preview.
* Added release packaging, commercial documentation, and expanded smoke checks.

= 0.1.0 =

* Initial prototype with styled shortcodes, automatic placement, per-content overrides, and Tocbot navigation.
