WordPress Plugin: Identify External Links
Identify External Links 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).
Identify External Links 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).
This post was written by . You can visit the Author Archive for a short bio, more posts, and other information about the author.
A plugin? All that’s needed is a little CSS modding, via the edit theme control panel in 1.5. You can even add a logo for e-mail.
/* link hack */#content a[href^="mailto:"] {
background: transparent url('/images/email.gif') 100% 50% no-repeat;
padding-right: 10px;
}
#content a[href^="http:"], #content a[href^="http:"] {
background: transparent url('/images/external.gif') 100% 50% no-repeat;
padding-right: 10px;
white-space: nowrap;
}
#content a[href^="http://www.your-own-url.com"],
#content a[href^="http://your-own-url.com"] {
background: inherit;
padding-right: 0px;
}
That’s loosely based on the code from web-graphics.com, and it works fine on any application I’ve used it for.