• Presently I must manually add ‘Title=”blah, blah”/’ to any link I desire to include a descriptive hover flyout (which is most of them).

    Ideally, I’d like a plug-in (or code/core modification) for links that would bring-up a second input box (called “Title?”) for links just as “image” additions currently do.

    If one exists, I couldn’t find it by searching.

    TIA my friends.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Version 2.0
    /wp-includes/js/quicktags.js
    Line 371
    edButtons[i].tagStart = '<a href="' + URL + '">';

    Edit that to:
    edButtons[i].tagStart = '<a href="' + URL + '" title="">';

    That will insert the title=”” for you each time. Not ideal and it cannot be used with the wysiwyg toolbar.

    Or, for a prompt (the same as for the link):
    http://wordpress.org/support/topic/7756?replies=7

    Note the line
    edButtons[i].tagStart = '< a href=""'<br" />

    should read
    edButtons[i].tagStart = '< a href=""'

    Mod/Podz – Any chance this can be edited in the other thread?

    Thread Starter apsey

    (@apsey)

    Thanks fellas/gals.

    Your posts put me on the track but the link code needed some tweaking to work for me (using WP 2.0)

    This code works like a charm in 2.0 when placed in the wp-includes/js/quicktags.js file (with the other edInsertLink function within commented out (disabled), of course):


    function edInsertLink(myField, i, defaultValue) {
    if (!defaultValue) {
    defaultValue = 'http://';
    }
    if (!edCheckOpenTags(i)) {
    var URL = prompt ('Enter the link URL' ,defaultValue);
    if (URL) {
    edButtons[i].tagStart = '<a href="' + URL + '" title="' + prompt('Enter a title for the link', '') + '"/>';
    edInsertTag(myField, i);
    }
    }
    else {
    edInsertTag(myField, i);
    }
    }

    Notice my added and essential forward-slash following the prompt for title.

    Again, my warm thanks for the rapid response. YMMV, but this is a great improvement for the way I work.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘“Title=” mod request’ is closed to new replies.