Make WordPress Core

Changeset 31714


Ignore:
Timestamp:
03/11/2015 03:00:15 AM (12 years ago)
Author:
azaozz
Message:

wpLink: change the text label to Link text, always focus the URK field, fix Ctrl/Cmd + K shortcut. See #28206.

Location:
trunk/src/wp-includes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-editor.php

    r31713 r31714  
    14501450                                <p class="howto"><?php _e( 'Enter the destination URL' ); ?></p>
    14511451                                <div class="wp-link-text-field">
    1452                                         <label><span><?php _e( 'Text' ); ?></span><input id="wp-link-text" type="text" /></label>
     1452                                        <label><span><?php _e( 'Link text' ); ?></span><input id="wp-link-text" type="text" /></label>
    14531453                                </div>
    14541454                                <div>
  • trunk/src/wp-includes/js/tinymce/plugins/wplink/plugin.js

    r31713 r31714  
    66
    77        // WP default shortcut
    8         editor.addShortcut( 'alt+shift+a', '', 'WP_Link' );
     8        editor.addShortcut( 'Alt+Shift+A', '', 'WP_Link' );
    99        // The "de-facto standard" shortcut, see #27305
    10         editor.addShortcut( 'ctrl+k', '', 'WP_Link' );
     10        editor.addShortcut( 'Meta+K', '', 'WP_Link' );
    1111
    1212        editor.addButton( 'link', {
    1313                icon: 'link',
    1414                tooltip: 'Insert/edit link',
    15                 shortcut: 'Alt+Shift+A',
    1615                cmd: 'WP_Link',
    1716                stateSelector: 'a[href]'
    … …  
    2726                icon: 'link',
    2827                text: 'Insert link',
    29                 shortcut: 'Alt+Shift+A',
    3028                cmd: 'WP_Link',
    3129                stateSelector: 'a[href]',
  • trunk/src/wp-includes/js/wplink.js

    r31713 r31714  
    162162                                // If this is moved above the selection changes,
    163163                                // IE will show a flashing cursor over the dialog.
    164                                 if ( inputs.wrap.hasClass( 'has-text-field' ) ) {
    165                                         inputs.text.focus();
    166                                 } else {
    167                                         inputs.url.focus()[0].select();
    168                                 }
     164                                inputs.url.focus()[0].select();
    169165                        }
    170166
Note: See TracChangeset for help on using the changeset viewer.