plugin-icon

Paragraph Level IDs

The plugin adds an 'id' attribute to each paragraph tag in a blog post.
评级
5
最后更新
January 6, 2015
版本
1.0
活跃安装
10
Paragraph Level IDs

The Paragraph Level IDs plugin adds an ‘id’ attribute to each paragraph tag in a blog post, giving the author and readers additional functionality.

So for example, <p> becomes <p id=”para1234-5″>.

These additions allow anyone to link directly to that paragraph in the post. This is especially useful for long tracts of text, academic writing, and legal documents.

Road Map

In the future I hope to make the following improvements.

  • Streamline the code so it is at its most efficient and smallest file size.
  • Further customisation options for the id
  • A degree of backwards compatibility and localisation for other languages
  • An option so this feature is only applied to the post types specified.

I would welcome any advice, offers of support, bug-testing, forking the project and troubleshooting to help make these extra features possible.

Acknowledgements

My friend @strangerpixel overhauled the 0.2 code for this 1.0 release.

The comment by s_ha_dum in [this Stack Exchange thread] (http://wordpress.stackexchange.com/questions/74558/automate-paragraphs-in-a-post-page-to-have-a-unique-anchor-link) and the comment by Milo in [this Stack Exchange thread] (http://wordpress.stackexchange.com/questions/90066/numbering-sections-and-block-level-elements-in-wpautop-wordpress-as-cms-for-l) got me started. The [Add To Post plugin (https://wordpress.org/plugins/add-to-post/) was instructive in helping me build a simple settings form.

免费使用Creator套餐
活跃安装
10
目前已测试版本
4.1.41
此插件可供下载,可用于您的 WordPress 自托管安装。