Ticket #44662: 44662-5.diff
File 44662-5.diff, 2.2 KB (added by , 6 years ago) |
---|
-
src/js/_enqueues/lib/link.js
diff --git src/js/_enqueues/lib/link.js src/js/_enqueues/lib/link.js index 7c8c498..10eb3e0 100644
507 507 508 508 searchInternalLinks: function() { 509 509 var waiting, 510 search = inputs.search.val() || ''; 510 search = inputs.search.val() || '', 511 searchLength = parseInt( wpLinkL10n.minimumSearchWordLength, 10 ); 511 512 512 if ( search.length > 2) {513 if ( search.length >= searchLength ) { 513 514 rivers.recent.hide(); 514 515 rivers.search.show(); 515 516 -
src/wp-includes/script-loader.php
diff --git src/wp-includes/script-loader.php src/wp-includes/script-loader.php index fa8b60b..331e71c 100644
function wp_default_scripts( &$scripts ) { 1387 1387 $scripts->add( 'admin-bar', "/wp-includes/js/admin-bar$suffix.js", array(), false, 1 ); 1388 1388 1389 1389 $scripts->add( 'wplink', "/wp-includes/js/wplink$suffix.js", array( 'jquery', 'wp-a11y' ), false, 1 ); 1390 1391 /* translators: Input word length for incremental post search. Start searching from the number. */ 1392 $minimum_search_word_length = _x( '3', 'minimum length for searching links' ); 1393 if ( ! empty( $minimum_search_word_length ) && is_numeric( $minimum_search_word_length ) ) { 1394 $minimum_search_word_length = absint( $minimum_search_word_length ); 1395 } else { 1396 $minimum_search_word_length = 3; 1397 } 1398 1390 1399 did_action( 'init' ) && $scripts->localize( 1391 1400 'wplink', 1392 1401 'wpLinkL10n', 1393 1402 array( 1394 'title' => __( 'Insert/edit link' ), 1395 'update' => __( 'Update' ), 1396 'save' => __( 'Add Link' ), 1397 'noTitle' => __( '(no title)' ), 1398 'noMatchesFound' => __( 'No results found.' ), 1399 'linkSelected' => __( 'Link selected.' ), 1400 'linkInserted' => __( 'Link inserted.' ), 1403 'title' => __( 'Insert/edit link' ), 1404 'update' => __( 'Update' ), 1405 'save' => __( 'Add Link' ), 1406 'noTitle' => __( '(no title)' ), 1407 'noMatchesFound' => __( 'No results found.' ), 1408 'linkSelected' => __( 'Link selected.' ), 1409 'linkInserted' => __( 'Link inserted.' ), 1410 'minimumSearchWordLength' => $minimum_search_word_length, 1401 1411 ) 1402 1412 ); 1403 1413