TinyMCE, inline link:
- Add `uiAutocompleteL10n` with translatable strings for use in UI Autocomplete live region. - Use the above strings in both the editor plugin and wplink.js. See #33301. Built from https://develop.svn.wordpress.org/trunk@36806 git-svn-id: http://core.svn.wordpress.org/trunk@36773 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ee85740365
commit
40b3bb7988
|
@ -365,6 +365,18 @@
|
|||
minLength: 2,
|
||||
position: {
|
||||
my: 'left top+2'
|
||||
},
|
||||
messages: {
|
||||
noResults: ( typeof window.uiAutocompleteL10n !== 'undefined' ) ? window.uiAutocompleteL10n.noResults : '',
|
||||
results: function( number ) {
|
||||
if ( typeof window.uiAutocompleteL10n !== 'undefined' ) {
|
||||
if ( number > 1 ) {
|
||||
return window.uiAutocompleteL10n.manyResults.replace( '%d', number );
|
||||
}
|
||||
|
||||
return window.uiAutocompleteL10n.oneResult;
|
||||
}
|
||||
}
|
||||
}
|
||||
} ).autocomplete( 'instance' )._renderItem = function( ul, item ) {
|
||||
return $( '<li role="option" id="mce-wp-autocomplete-' + item.ID + '">' )
|
||||
|
|
File diff suppressed because one or more lines are too long
Binary file not shown.
|
@ -95,6 +95,18 @@ var wpLink;
|
|||
minLength: 2,
|
||||
position: {
|
||||
my: 'left top+2'
|
||||
},
|
||||
messages: {
|
||||
noResults: ( typeof window.uiAutocompleteL10n !== 'undefined' ) ? window.uiAutocompleteL10n.noResults : '',
|
||||
results: function( number ) {
|
||||
if ( typeof window.uiAutocompleteL10n !== 'undefined' ) {
|
||||
if ( number > 1 ) {
|
||||
return window.uiAutocompleteL10n.manyResults.replace( '%d', number );
|
||||
}
|
||||
|
||||
return window.uiAutocompleteL10n.oneResult;
|
||||
}
|
||||
}
|
||||
}
|
||||
} ).autocomplete( 'instance' )._renderItem = function( ul, item ) {
|
||||
return $( '<li role="option" id="mce-wp-autocomplete-' + item.ID + '">' )
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -224,6 +224,14 @@ function wp_default_scripts( &$scripts ) {
|
|||
$scripts->add( 'jquery-ui-tooltip', "/wp-includes/js/jquery/ui/tooltip$dev_suffix.js", array( 'jquery-ui-core', 'jquery-ui-widget', 'jquery-ui-position' ), '1.11.4', 1 );
|
||||
$scripts->add( 'jquery-ui-widget', "/wp-includes/js/jquery/ui/widget$dev_suffix.js", array('jquery'), '1.11.4', 1 );
|
||||
|
||||
// Strings for 'jquery-ui-autocomplete' live region messages
|
||||
did_action( 'init' ) && $scripts->localize( 'jquery-ui-autocomplete', 'uiAutocompleteL10n', array(
|
||||
'noResults' => __( 'No search results.' ),
|
||||
/* translators: Number of results found when using jQuery UI Autocomplete */
|
||||
'oneResult' => __( '1 result found. Use up and down arrow keys to navigate.' ),
|
||||
'manyResults' => __( '%d results found. Use up and down arrow keys to navigate.' ),
|
||||
) );
|
||||
|
||||
// deprecated, not used in core, most functionality is included in jQuery 1.3
|
||||
$scripts->add( 'jquery-form', "/wp-includes/js/jquery/jquery.form$suffix.js", array('jquery'), '3.37.0', 1 );
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.5-beta1-36805';
|
||||
$wp_version = '4.5-beta1-36806';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue