Link Cloaking Plugin for WordPress
I’ve created a plugin for WordPress that can cloak outgoing links in your posts and/or pages (note : if you’d rather have a more general link cloaking tool, take a look at Link Manager).
Features
- Choose what to cloak - all links, only the links you specify or no links at all.
- Choose where to cloak - posts, pages or both.
- Configure the URL - you can set the “prefix” part of the URL (see examples below).
- Exception list - links pointing to domains in this list will not be cloaked. For example, this is useful if you have chosen to cloak all links but don’t want to cloak the links to your own domains.
- Compatible with all browsers - the link cloaker plugin doesn’t use JavaScript so it will work even for visitors that have disabled JS.
- “Smart” cloaking - relative, ambiguous or malformed URLs will not be cloaked. Better safe than sorry.
- Update : version 1.1 available - now with static link cloaking!
Examples
Here’s a link explicitly tagged for cloaking -
<a href="http://evil-guide.tripod.com/"><!--cloak-->A Cloaked Link</a>
And here’s what it looks like in the post - A Cloaked Link
If you have configured the plugin to cloak all links (the default) you don’t need the <!–cloak–> tag inside your links.
Installation
- Download the link-cloaking-plugin.zip file.
- Unzip the file.
- Upload the `link-cloaking-plugin` folder to the `/wp-content/plugins/` directory.
- Activate the plugin through the ‘Plugins’ menu in WordPress.
- (Optional) Go to Options -> Link Cloaking and modify the default settings to your liking.
- Go to Options -> Permalinks and click “Update Permalinks”. This ensures the plugin’s link redirection code is added to WordPress .htaccess file.
Download
Version 1.2.2 : link-cloaking-plugin.zip (9 KB)
Tested on WP 2.2 - 2.6.2.
mod_rewrite is required. If “fancy permalinks” work on your blog then you probably have this.
April 8th, 2008 at 1:27 am
I’m going to assume you mean they are not in your posts. In that case, you could use static cloaking for them. But yes, it involves some manual work.
April 8th, 2008 at 1:12 am
I got some 125×125 ads on my blog, when you hover on them, you will see the url. So, I want to cloak those links, is that possible?
If not then I would have to create individual files and redirect the link manually.
April 8th, 2008 at 1:07 am
If the image ad is simply a normal linked image in a post or page, then yes, the plugin should be able to cloak it automatically.
If the ad is something complex, like Flash, JavaScript or an IFrame, or if it is located somewhere else - e.g. in the sidebar - then the plugin won’t cloak it.
April 8th, 2008 at 12:55 am
Hey, great plugin you got here.
I’ve been searching for this like forever.
Installed and works like a charm.
One question though, can it parse or cloak the affiliate url on referral image ads?
If so, can you explain how to do this?
Thanks.
April 7th, 2008 at 11:06 pm
Thanks for this plugin!!
April 6th, 2008 at 12:46 pm
Thanks, i update the permalinks and its working again.
Many thanks
April 5th, 2008 at 3:53 pm
It works on the WP 2.5 blog that I tested it with, but you might need to update permalinks again.
April 5th, 2008 at 3:05 pm
Does the plugin work with 2.5?
I had it running on a blog using 2.3.3 but since upgrading its no longer working..
March 29th, 2008 at 8:22 pm
Woks like a charm! Thanks a milion!
March 29th, 2008 at 8:15 pm
Comment out this line:
in wplc_link_cloaking_plugin.php. It’s around line 148.
There’s other stuff that could/should be removed as well, but the above line is the only one you need to remove if you just want to prevent the plugin from adding prototype.js inside the <head> tags.
I hope that makes sense
March 29th, 2008 at 7:34 pm
I’m stupid hehe.. Did not manage to remove prototype..
Could I ask for som pointers in what to edit? If it aint to much
Thanks
March 29th, 2008 at 2:49 pm
Ok. Thanks for the answer, will try to take out the pototype then
And thanks again for a nice plugin!
March 29th, 2008 at 2:13 pm
prototype.js is only necessary if you use “static” cloaked links - it’s used on the AJAX-y link editing screen. Other kinds of cloaked links - like those marked with <–cloak–> - don’t need any JavaScript.
March 29th, 2008 at 12:46 pm
Hi
Trying out the plugin now and like it so far!
But one thing, is it possible to use it whitout the prototype js?
March 28th, 2008 at 6:11 pm
You could use the static cloaking feature to do this. Alternatively, you could use a plugin that checks for broken links.
March 28th, 2008 at 5:11 pm
Hi Techs,
i have a blog where i publish Freeware posts (http://www.telebajar.com) .
I am looking for a wp plugin to wrap
the URL´s to the download sites so that i link to a cloaked URL and i can avoid to have broken links to non existing download URLs (outdated)
a good example is sourceforge.net whre the download links and the mirros are always changing. Do you think this plugin will be useful for this?
Thank a lot in advance
Telebajador
March 21st, 2008 at 6:51 pm
ah I see, yeah the post is pulling some of the information from a database using PHP so that could be the problem. thanks for taking a look.
March 21st, 2008 at 5:35 pm
I’ve looked at your page. The links redirect back to the homepage because the plugin can’t find the original (uncloaked) link in the post.
This can happen if the original link was created by another plugin, or if it uses some unusual code (as opposed to the normal <a href=’….’>lalala</a> way).
March 21st, 2008 at 4:32 pm
I’ve been trying this plugin here
http://www.hyperhigh.co.uk/orbounder-trampoline.html
but every click sends me back to the home page
Without the plugin activated it sends me to the right place - any advice is much appreciated!
March 20th, 2008 at 4:00 am
hey, nice and neat plugin. Thank you!
March 12th, 2008 at 5:13 pm
[...] into a clickable link. You might want to use a link cloaking plugin for Wordpress such as this : ø Link Cloaking Plugin for WordPress | W-Shadow.com ø Highlighting sales, special offers, discount codes etc should help especially if they are [...]
March 6th, 2008 at 10:34 pm
[...] W-Shadow developed a Link Cloaking Plugin for WordPress and is pretty much well-supported by its developer. I suppose it’s a nice alternative to other “affiliate link manager” (as they like to call themselves, but they’re just fancy words for masking or cloaking links! ) scripts out there, and it seems pretty easy to install, although from reading the comments it also looks like you need to meddle a bit with your htaccess file to make it really work well. [...]
February 22nd, 2008 at 12:39 pm
Check some of the comments above. You probably need to move the plugin code in .htaccess to the top of that file.
February 22nd, 2008 at 11:21 am
Seems still not working with wordpress version 2.3.3 any advice?..
February 10th, 2008 at 2:10 am
[...] einfachste Methode ist meiner Meinung nach: Link Cloaking Plugin von W-Shadow. Einfach [...]
January 30th, 2008 at 12:41 pm
I have seen this is a great one for a nice Wp plugins
Thank You..
January 28th, 2008 at 4:09 am
I put the plugin code on the top of the .htaccess, yeah,it works!! Thanks
January 28th, 2008 at 1:16 am
Eh, I don’t know. Maybe you need to put the plugin code before the authentication codes? Or something?… No new ideas :/
January 27th, 2008 at 11:07 pm
pls try to find a solution for my problem =\
i need your plugin very much ^^
January 26th, 2008 at 6:04 pm
Good idea, I’ll add it to the readme.