Make WordPress Core


Ignore:
Timestamp:
06/17/2016 08:40:04 PM (10 years ago)
Author:
azaozz
Message:

Editor: after inserting a link detect if the URL is broken, first run.

Props iseulde, azaozz.
See #36638.

File:
1 edited

Legend:

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

    r37492 r37741  
    10641064                        'Letter' => __( 'Letter' ),
    10651065                        'Action' => __( 'Action' ),
     1066                        'Invalid host name.' => __( 'Invalid host name.' ),
    10661067                        'To move focus to other buttons use Tab or the arrow keys. To return focus to the editor press Escape or use one of the buttons.' =>
    10671068                                __( 'To move focus to other buttons use Tab or the arrow keys. To return focus to the editor press Escape or use one of the buttons.' ),
    … …  
    12841285                <?php
    12851286
    1286                 if ( in_array( 'wplink', self::$plugins, true ) || in_array( 'link', self::$qt_buttons, true ) )
     1287                $has_wplink = in_array( 'wplink', self::$plugins, true );
     1288
     1289                if ( $has_wplink ) {
     1290                        echo '<input type="hidden" id="_wplink_urltest_nonce" value="' . wp_create_nonce( 'wp-test-url' ) . '" />';
     1291                }
     1292
     1293                if ( $has_wplink || in_array( 'link', self::$qt_buttons, true ) ) {
    12871294                        self::wp_link_dialog();
     1295                }
    12881296
    12891297                /**
Note: See TracChangeset for help on using the changeset viewer.