Make WordPress Core

Changeset 46988


Ignore:
Timestamp:
12/18/2019 01:13:14 AM (5 years ago)
Author:
SergeyBiryukov
Message:

I18N: Make the minimum input length to start searching posts in the "Insert/edit link" modal localizable.

Props Toro_Unit, birgire, miyauchi, swissspidy, ocean90.
Fixes #44662.

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/_enqueues/lib/link.js

    r44699 r46988  
    508508        searchInternalLinks: function() {
    509509            var waiting,
    510                 search = inputs.search.val() || '';
    511 
    512             if ( search.length > 2 ) {
     510                search = inputs.search.val() || '',
     511                minInputLength = parseInt( wpLinkL10n.minInputLength, 10 ) || 3;
     512
     513            if ( search.length >= minInputLength ) {
    513514                rivers.recent.hide();
    514515                rivers.search.show();
  • trunk/src/wp-includes/script-loader.php

    r46874 r46988  
    15051505            'linkSelected'   => __( 'Link selected.' ),
    15061506            'linkInserted'   => __( 'Link inserted.' ),
     1507            /* translators: Minimum input length in characters to start searching posts in the "Insert/edit link" modal. */
     1508            'minInputLength' => (int) _x( '3', 'minimum input length for searching post links' ),
    15071509        )
    15081510    );
Note: See TracChangeset for help on using the changeset viewer.