Document Type Styles – WordPress Plugin

I wrote this plugin as an example for the WordPress Complete book, and decided to make it all proper.

Download

Add Document Type Styles

last updated: 2010-02-12

Description

This is the first released version of this plugin. I have improvements in mind, but none have been implemented as of yet. Future versions to include:

  • Instead of requiring that the user edit the stylesheet, the plugin should generate the stylesheet on the fly every time the option is saved.
  • Instead of requiring the user to FTP their new icon, the plugin should allow the user to upload the new icon directly via the new management page.
  • The plugin should display the icons for the supported document types on the management page, so the users can see what they look like.
  • The plugin should check to make sure that for every document type in the option field, there is an existing icon or display an error to the user.

Directions

The usual. Just upload the plugin and activate it. There is also a management page that you can use to add additional formats other than those that come supported. This page includes instructions on adding new document types.

Feedback

I would love to have your feedback. Just use the contact page to let me know your thoughts.

Changelog
Version 1.2 – 2010-02-12 – Added regex that removes the special style from links that contain images.