== Changelog == = 7.4.0 = * Added: Optional CSS-only scroll spy to underline the current section link in supporting browsers. Enable Highlight current section in the block settings or enforce it globally under Settings > SimpleTOC. No JavaScript or polyfill is added. = 7.3.1 = * Fixed: Heading anchors for non-Latin scripts (Japanese, Chinese, Korean, Cyrillic, etc.) were double URL-encoded, breaking externally shared or hand-written fragment links. Props to the reporter of issue #89. = 7.3.0 = * Changed: Box is now a native Gutenberg block style in the Styles tab. * Added: Native text, link, background color, margin, and padding controls. * Added: theme.json styling support for colors, spacing, and typography. * Added: WordPress 7.1 support and automated compatibility tests. * Changed: Existing box-style blocks and the global Force box style setting remain compatible. * Thanks: Lovro Hrust (@lovor) for the theme.json and block styling feedback. = 7.2.0 = * Changed: SimpleTOC now always uses the standard Gutenberg block wrapper so themes can style it through theme.json. * Removed: Obsolete block and global wrapper settings because the standard wrapper is now always active. * Added: Native Gutenberg typography controls for font size and line height. = 7.1.1 = * Fixed: Prevented WordPress HTML API notices when nested block content is not a string. * Fixed: Escaped TOC links and titles before rendering them. * Fixed: Preserved legacy SimpleTOC block validity in the WordPress editor. = 7.1.0 = * Fixed: Avoid DOMDocument HTML parsing for highlighted heading markup by using the WordPress HTML API. * Changed: Minimum required WordPress version is now 6.2. * Added: PHPUnit coverage for core rendering helpers and an editor e2e smoke test. = 7.0.10 = * Fixed: Prevent the SimpleTOC editor preview from collapsing during WordPress autosaves. * Changed: Automatic editor refresh now runs after manual post saves and keeps the previous TOC visible while updating. = 7.0.9 = * Fixed: Restored WordPress 7.0 editor previews for existing SimpleTOC blocks that contain legacy editor-only attributes. * Fixed: The "Hide SimpleTOC" editor toggle no longer stores a redundant helper attribute. = 7.0.8 = * Fixed: Prevent editor preview errors when another plugin adds editor-only attributes to blocks, for example Noted! block notes. Thanks Hans-Gerd Gerhards (@hage). = 7.0.7 = * Fix invalid frontend TOC list markup when excluded heading levels appear between included headings. = 7.0.6 = * Prepared release for WordPress 7.0 compatibility. = 7.0.5 = * Fixed: GenerateBlocks dynamic tags in heading links keep working when SimpleTOC adds heading IDs. * Fixed: GenerateBlocks dynamic heading text is resolved consistently in the TOC and matching heading anchors. * Maintenance: Added automated GitHub README generation from the WordPress.org `readme.txt`. = 7.0.4 = * Fixed: GenerateBlocks dynamic tags in heading links keep working when SimpleTOC adds heading IDs. * Fixed: GenerateBlocks dynamic heading text is resolved consistently in the TOC and matching heading anchors. = 7.0.3 = * Fixed: Removed an invalid `aria-labelledby` reference from hidden TOC `
` markup and now rely on native `` labeling. = 7.0.2 = * Fixed: Removed an invalid `aria-labelledby` reference from hidden TOC `
` markup and now rely on native `` labeling. = 7.0.1 = * Added: Direct link from the Advanced Features sidebar to the global SimpleTOC settings. * Fixed: Global settings link now appears reliably in the editor sidebar. * Changed: Wrapper toggle now reflects the automatic wrapper state while box style is active. = 7.0.0 = * Added: Box style option in the block sidebar with a color picker and default gray background. * Added: Global setting to force the default gray box style for all SimpleTOC blocks. * Added: Frontend box-style CSS registered through block metadata. = 6.9.8 = * Updated: Dependencies and house-keeping. * Fix: corrected dependency declarations. = 6.9.7 = * Fixed: GeneratePress Dynamic Tags work again - hopefully. If not, please report here https://github.com/mtoensing/simpletoc/issues/79#issuecomment-3745650464 Thanks @jhanten = 6.9.6 = * Added: Coding standards cleanup with improved rules, cleaner code, safer output, and consistent naming. Thanks @ronalfy * Added: Minimum PHP version requirement set to 7.3 = 6.9.4 = * Added: Introduced proper PHP namespaces to avoid class and function name conflicts and improve overall code robustness. Thanks @ronalfy. * Added: Improved sidebar sub-menu for the "Hide SimpleTOC" option = 6.9.3 = * Fix: Fix Multiple IDs in Table of Contents Thanks @ronalfy * Added: Support for GenerateBlocks 2.1.0 Thanks @ronalfy = 6.9.1 = * Added: Support for the new V3 block api. * Added: Tested compatibility with WordPress 6.9 = 6.7.3 = * Added: Tested compatibility with WordPress 6.8 = 6.7.2 = * Added: Support for GenerateBlocks 2.0. Thanks @blronaldhuereca * Added: Included an accessibility statement in the plugin description. Thanks Gen Herres. = 6.6.1 = * Added: Initialize the JavaScript for the TOC accordion on page load or after the document has fully loaded. Thanks blronaldhuereca https://github.com/mtoensing/simpletoc/pull/63 = 6.6.0 = * Added: Tested compatibility with WordPress 6.7 = 6.5.6 = * Fixed: All script versions have been updated to prevent caching issues. * Fixed: Legacy Accordion was always expanded. Thanks Francesco Palmieri. * Added: Updated dependencies for improved performance and stability.​ * Added: Tested compatibility with WordPress 6.6 = 6.4.3 = * Added: A pointer cursor on hover for the hidden TOC = 6.4.3 = * Added: Utilizes the browser's built-in details tag for a collapsible interface. Thanks @infinitnet * Compatibility with WordPress 6.5 * Fixed: Minor localization problems. = 6.3.2 = * Fixed: Option for automatic refresh did not work in some instances. = 6.3.0 = * Added: Option for automatic refresh. This can be disabled in the blocks advanced settings. * Added: Option to globally disable automatic refresh in the WordPress SimpleTOC settings. = 6.2.0 = * Added: Implemented smooth animation for improved user interaction in the accordion menu. * Added: Upgraded styling of the accordion menu for a more visually appealing and modern user experience. = 6.1.0 = * Fixed: Broken markup when tags closed for headers below minimum. Thanks @harmoney ! = 6.0.10 = * Added aria-hidden attribute to icon in accordion. Thanks Alex Stine! = 6.0.9 = * Added ARIA accessibility labels for the accordion. Thanks Amber Hinds! * Fixed: Caching of accordion JavaScript. Thanks jghitchcock! * Added correct ARIA controls attribute. = 6.0.4 = * Fix: specific min/max values for could result in merged headlines. = 6.0.2 = * Fix: "Update failed" with error 500 when Rank Math is installed. = 6.0.0 = * Feature: Added SimpleTOC global settings to override individual block configuration. * Fix: Better output with well-formed HTML and consistent double quotation marks. * Fix: Refactored php code using GPT-4. = 5.0.56 = * Feature: Optional div wrapper with role=navigation and ARIA attributes. * Fix: Removed deprecated php function 'utf8_decode'. = 5.0.55 = * Feature: Better smooth-scrolling support. Thanks Clarus Dignus! = 5.0.53 = * Fix: Prevent direct access to plugin files. Thanks rafaucau! = 5.0.52 = * Fix: wp_set_script_translations undefined in older WordPress installations. = 5.0.51 = * Fix: Accordion menu CSS alignment. = 5.0.50 = * Fix: Identifier 'i' has already been declared * Fix: SimpleTOC will not nag the user about changed content in the editor anymore. Therefore I removed the corresponding option from the settings. * Fix: Minor changes to accordion css. = 5.0.45 = * Feature: Option to render SimpleTOC heading as paragraph. * Fix: Added margin to the bottom of the accordion menu. = 5.0.43 = * Compatibility with WordPress 6.1 * Feature: Hide SimpleTOC in an accordion menu. Adds minimal JavaScript and css styles if enabled. * Feature: Option to change SimpleTOC block heading level. * Fix: Accordion menu can now be added multiple times. * Fix: Accordion styling in Gutenberg editor. * Fix: Minor accordion styling fixes. * Fix: Added JavaScript and CSS for the accordion menu by using standard methods. = 5.0.36 = * Feature: [Spin up](https://demo.tastewp.com/simpletoc) a new WordPress instance with the SimpleTOC plugin already installed. * Fix: Better handling for `simpletoc-hidden` class to hide headings. Thank you blronaldhuereca! = 5.0.34 = * Feature: Moved list controls to toolbar and rearranged settings to fit block order. * Feature: Filter for developers to wrap toc with a div tag. Thank you rafaucau! * Fix: Minor localization tweaks. = 5.0.31 = * Feature: Filter for developers to exclude specific blocks. See faq for details. Thanks rafaucau! * Feature: Easier development with @wordpress/env to start a dev environment. Thanks rafaucau! = 5.0.28 = * Feature: Change the TOC headline in the block options. Thank you Philipp Stracker! = 5.0.17 = * Feature: Support for custom Anchor IDs in headings. Thank you Matthias Altmann!