WordPress Hack: Opening Links in New Windows

10:57:00 0 Comments A+ a-

Do you like to open every link of your website in different page or _blank page ?
If yes then you just have make some litter changes in your admin file

Step 1 - Wp-admin > quicktags.js 

Step 2

if (!edCheckOpenTags(i)) {
var URL = prompt('Enter the URL' ,defaultValue);
if (URL) {
edButtons[i].tagStart = '<a href="' + URL + '">';
edInsertTag(myField, i);
}
}
Step 3. Replace it with:

if (!edCheckOpenTags(i)) {
var URL = prompt('Enter the URL' ,defaultValue);
if (URL) {
edButtons[i].tagStart = '<a href="' + URL + '"';
if (URL!='http://')
{
var defaultTarget = prompt('Enter the Target' ,'_blank');
if (defaultTarget) edButtons[i].tagStart += ' target="' + defaultTarget + '"';
} edButtons[i].tagStart +='>';
edInsertTag(myField, i);
}
}