After my post on how to clean up the target=”_blank” in a WordPress post I decided to turn my code into a WordPress plugin.

WordPress is my CMS of choice but I also love XHTML 1.1 which means that the default way WordPress handles for opening links in a new window doesn’t validate. That’s why I wrote this plugin.

LDB External Links does exactly what you’d expect it to do. It searches your WordPress content for links with target=”_blank” and replaces it with a link with rel=”external”. Via an added javascript to your wp-head() it then re-adds the the target=”_blank”.

Installation

Upload the folder `ldb-external-links` to the `/wp-content/plugins/` directory Activate the plugin through the ‘Plugins’ menu in WordPress Presto, Your done! No configuration needed.

Changelog

1.1 Added a configuration page so you can choose the value of the rel attribute. 1.0 First version of the plugin.

Share this: Twitter

Facebook

