Make WordPress Core


Ignore:
Timestamp:
03/11/2015 02:39:02 AM (9 years ago)
Author:
azaozz
Message:

wpLink: replace the "Title" field with a "Text" field and populate it with the link text when editing an existing link or with the selected text if any.
Props iseulde. See #28206.

File:
1 edited

Legend:

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

    r31222 r31713  
    14491449            <div id="link-options">
    14501450                <p class="howto"><?php _e( 'Enter the destination URL' ); ?></p>
    1451                 <div>
    1452                     <label><span><?php _e( 'URL' ); ?></span><input id="url-field" type="text" name="href" /></label>
     1451                <div class="wp-link-text-field">
     1452                    <label><span><?php _e( 'Text' ); ?></span><input id="wp-link-text" type="text" /></label>
    14531453                </div>
    14541454                <div>
    1455                     <label><span><?php _e( 'Title' ); ?></span><input id="link-title-field" type="text" name="linktitle" /></label>
     1455                    <label><span><?php _e( 'URL' ); ?></span><input id="wp-link-url" type="text" /></label>
    14561456                </div>
    14571457                <div class="link-target">
    1458                     <label><span>&nbsp;</span><input type="checkbox" id="link-target-checkbox" /> <?php _e( 'Open link in a new window/tab' ); ?></label>
     1458                    <label><span>&nbsp;</span><input type="checkbox" id="wp-link-target" /> <?php _e( 'Open link in a new window/tab' ); ?></label>
    14591459                </div>
    14601460            </div>
     
    14641464                    <label>
    14651465                        <span class="search-label"><?php _e( 'Search' ); ?></span>
    1466                         <input type="search" id="search-field" class="link-search-field" autocomplete="off" />
     1466                        <input type="search" id="wp-link-search" class="link-search-field" autocomplete="off" />
    14671467                        <span class="spinner"></span>
    14681468                    </label>
Note: See TracChangeset for help on using the changeset viewer.