automattic / table-of-contents Goto Github PK
View Code? Open in Web Editor NEWAdds a table of contents to your WordPress pages based on h3 and h4 tags. Useful for documention-centric sites.
Adds a table of contents to your WordPress pages based on h3 and h4 tags. Useful for documention-centric sites.
Hi Automatticians,
I am hoping to use this plugin, but I am getting "Non-static method Table_Of_Contents::init() should not be called statically" when I add it as a plugin and activate it. Any idea why?
The plugin can't run with php 8 version, no toc rendered in the page.
The TOC only generate the h3 headings tag, the h4 headings are not listed in the TOC generated
I'd love to use this plugin on my employer's Intranet site. Would would be the most sensible way to modify this plugin so that it only renders a TOC on specific pages?
Introduced in WP5.8 https://make.wordpress.org/core/2021/06/29/introducing-update-uri-plugin-header-in-wordpress-5-8/
Since there's another "table-of-contents" plugin in the wporg repo, this would prevent accidental overwrites when updating from the admin.
Not strictly a Gutenberg/Block Editor problem, but that does make it vastly easier to create incompatible headings.
The regex only matches plain tags:
table-of-contents/table-of-contents.php
Line 129 in 5b3da29
Any attributes added such as alignment mean the regex won't "find" the heading tag to add to the TOC.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.