Index: wp-includes/js/tinymce/plugins/wplink/js/wplink.dev.js =================================================================== --- wp-includes/js/tinymce/plugins/wplink/js/wplink.dev.js (revision 16508) +++ wp-includes/js/tinymce/plugins/wplink/js/wplink.dev.js (working copy) @@ -10,6 +10,7 @@ lastSearch: '', init : function() { inputs.dialog = $('#wp-link'); + inputs.update = $('#wp-link-update a'); // URL inputs.url = $('#url-field'); // Secondary options @@ -23,7 +24,7 @@ rivers.elements = $('.query-results', inputs.dialog); // Bind event handlers - $('#wp-link-update').click( wpLink.update ); + inputs.update.click( wpLink.update ); $('#wp-link-cancel').click( function() { tinyMCEPopup.close(); } ); rivers.elements.delegate('li', 'click', wpLink.selectInternalLink ) @@ -39,11 +40,9 @@ // Clear previously selected links rivers.elements.find('.selected').removeClass('selected'); - // Clear fields and focus the URL field - inputs.url.val('http://'); - inputs.title.val(''); tinyMCEPopup.restoreSelection(); + // If link exists, select proper values. if ( e = ed.dom.getParent(ed.selection.getNode(), 'A') ) { // Set URL and description. @@ -52,7 +51,19 @@ // Set open in new tab. if ( "_blank" == ed.dom.getAttrib(e, 'target') ) inputs.openInNewTab.attr('checked','checked'); + // Update save prompt. + inputs.update.text( wpLinkL10n.update ); + + // If there's no link, set the default values. + } else { + // Set URL and description to defaults. + // Leave the new tab setting as-is. + inputs.url.val('http://'); + inputs.title.val(''); + // Update save prompt. + inputs.update.text( wpLinkL10n.save ); } + tinyMCEPopup.storeSelection(); // If the focus is moved above the selection changes, // IE will show a flashing cursor over the dialog. Index: wp-includes/script-loader.php =================================================================== --- wp-includes/script-loader.php (revision 16508) +++ wp-includes/script-loader.php (working copy) @@ -272,6 +272,8 @@ $scripts->add( 'wplink', "/wp-includes/js/tinymce/plugins/wplink/js/wplink$suffix.js", array('jquery'), '20101119d' ); $scripts->localize( 'wplink', 'wpLinkL10n', array( + 'update' => __('Update'), + 'save' => __('Save Link'), 'untitled' => __('Untitled'), 'noMatchesFound' => __('No matches found.'), 'l10n_print_after' => 'try{convertEntities(wpLinkL10n);}catch(e){};', Index: wp-admin/includes/internal-linking.php =================================================================== --- wp-admin/includes/internal-linking.php (revision 16508) +++ wp-admin/includes/internal-linking.php (working copy) @@ -113,7 +113,7 @@