WP: Identify External Links

March 24, 2005
3:45 am
Posted in: Tech, WordPress

This plugin has been moved to my code section, here.

WP: Identify External Links

This plugin will add a special CSS class to all links in your entries and in your comments that go to external sites (sites other than your site).

Download

Identify External Links

Instructions

Copy and paste the text. Save it in a file named identify-external-links.php. Make sure there are no spaces before the opening <?php or after the closing ?>. Activate it from within the WordPress admin interface. You can then use a.extlink { } in your CSS to style it.

You can also edit the plugin to make it do other things like add target="_blank" to external links or to add special things only to your internal links.

Versions

  • Version 1.2 Doesn’t apply extlink class if there is an image within the link
  • Version 1.1 Works for subdomains now (thanks h0bbel!)
  • Version 1.0 Initial release
Mark Jaquith

Hi. I’m Mark Jaquith (JAKE-with). I make the WordPress publishing platform and am a freelance WordPress consultant. This is my personal blog. You can subscribe to my feed or follow me on Twitter and Google+.

83 Responses

Comments temporarily hidden. Will unhide once I get the spam under control.