Implementare l’attributo Title nei link di WordPress

Sabato 2 Luglio 2005 alle 19:22 in WordPress
Feed RSS

Con una piccola modifica del file \wp-admin\quicktags.js è possibile fare in modo che quando inseriamo un link in un post ci venga richiesto anche l’attributo title.

E’ sufficiente modificare la funzione edInsertLink da così:
[php]
function edInsertLink(myField, i, defaultValue) {
if (!defaultValue) {
defaultValue = ‘http://’;
}
if (!edCheckOpenTags(i)) {
var URL = prompt(’Enter the URL’ ,defaultValue);
if (URL) {
edButtons[i].tagStart = /’‘;
edInsertTag(myField, i);
}
}
else {
edInsertTag(myField, i);
}
}
[/php]

a così:

[php]
function edInsertLink(myField, i, defaultValue) {
if (!defaultValue) {
defaultValue = ‘http://’;
}
if (!edCheckOpenTags(i)) {
var URL = prompt(’Inserisci URL’ ,defaultValue);
if (URL) {
edButtons[i].tagStart = ‘
‘;
edInsertTag(myField, i);
}
}
else {
edInsertTag(myField, i);
}
}
[/php]

Semplice no?


Condividi questo post con gli altri:
  • co.mments
  • del.icio.us
  • BarraPunto
  • E-mail this story to a friend!
  • Facebook
  • Google
  • Segnalo
  • StumbleUpon
  • Technorati


Scrivi un commento