Description:
Scans your posts for acronym or abbr tags and then generates a proper definition-list out of the title attributes.

Little intro why i wrote this
I thought back on a webstandards discussion i had today. Of course it was about how to use stuff properly and the definition-list tag was one of the topics. Then i thought upon usability of my site (actually i am evaluating a new theme), while i was tidying up my code to make it better in the meaning of semantic markup. I hung on the stupid acronym thing. I know it is good and people should use it if they need help but - the average user is mostly unaware of the acronym thing and what the dotted line under an acronym means.

If you don't have a fancy popup script like me it is hard to discover that there is some explaination text beneath if you just hold the mouse over the marked text a bit longer. Matter of fact: Internet Explorer don't even highlight acronyms... and we all know how many people still use that thing.. however.. i thought there must be a smart way to make this markup more visble to users combined with using proper semantic markup. If you looked once for what definitions-lists are and what their purpose is you most likely stumbled upon a "glossary example". Well... that was my point to enter and beginning to write this small filterplugin.

What does it do?
Upon every page load it scans first for acronyms, then for abbr in order. Means.. the first match will be the first entry of the final list-output. Since abbr markup is checked after acronyms all abbr matches will append and begin at the end of the acronyms.

If you call the provided function within your templates you will get xHTML like this:

Sample HTML Output

HTML:
  1. <dl class="glossary">
  2.     <dt>example1</dt>
  3.         <dd>Uniform Resource Locator</dd>
  4.     <dt>example2</dt>
  5.         <dd>eXtensible Markup Language</dd>
  6.     <dt>example3</dt>
  7.         <dd>Cascading Style Sheets</dd>
  8.     <dt>example4</dt>
  9.         <dd>Internet Explorer</dd>
  10.     <dt>example5</dt>
  11.         <dd>WordPress Bloggin Software</dd>
  12. </dl>

Sample Rendered Output

example1
Uniform Resource Locator
example2
eXtensible Markup Language
example3
Cascading Style Sheets
example4
Internet Explorer
example5
WordPress Bloggin Software

How to install?

  1. Download the Archive and upload it to your Wordpress Plugin Folder
  2. Go to your Adminarea and activate the Plugin
  3. Insert the PHP Code into your Template: <?php show_deflist('css_classname_you_like'); ?>

Download
Click here to download Auto-Glossary Version 0.2 (zip)


CC-GNU GPL

This software is licensed under the CC-GNU GPL.