← All releases

wp-content/plugins/tenon/tenon.php

Tenon

Heading anchors that are stable, so a link to a section still works after an edit.

== Description ==

Auto-generated heading anchors derive from the heading text, so editing “Installation” to “Installing it” silently breaks every link anyone made to that section. Tenon generates an anchor once, stores it, and keeps it when the text changes.

Where an anchor genuinely must change, it records the old one and adds a client-side redirect on the page, so an old link still lands in the right place.

It also copies a section link to the clipboard from a control beside each heading, which is the feature that makes deep links get used at all.

== Screenshots ==

Numbered the way they ship in /assets/. Click any one to see it full width.

== Installation ==

  • Install and activate the plugin.
  • Anchors are generated for headings without one as posts are saved.
  • Existing posts: run wp tenon anchor --all.

Existing manual anchors are never touched.

== Frequently asked questions ==

Does it change my content?

It adds an id to headings that had none. Headings you anchored yourself are left alone.

Redirects?

A small script maps old anchors to new ones on the page. There is no server-side redirect, because fragments never reach the server.

== Changelog ==

= 1.3.1 =

  • Fixed: anchors were regenerated when a heading level changed, breaking links for a level change that did not touch the text.

= 1.3.0 =

  • Old-anchor mapping with an on-page redirect.