Changeset 48267
- Timestamp:
- 07/01/2020 07:48:30 PM (5 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/js/_enqueues/admin/common.js
r47771 r48267 3 3 */ 4 4 5 /* global setUserSetting, ajaxurl, commonL10n,alert, confirm, pagenow */5 /* global setUserSetting, ajaxurl, alert, confirm, pagenow */ 6 6 /* global columns, screenMeta */ 7 7 … … 16 16 var $document = $( document ), 17 17 $window = $( window ), 18 $body = $( document.body ); 18 $body = $( document.body ), 19 __ = wp.i18n.__; 19 20 20 21 /** … … 189 190 */ 190 191 warn : function() { 191 var msg = commonL10n.warnDelete || ''; 192 if ( confirm(msg) ) { 192 if ( confirm( __( 'You are about to permanently delete these items from your site.\nThis action cannot be undone.\n\'Cancel\' to stop, \'OK\' to delete.' ) ) ) { 193 193 return true; 194 194 } … … 758 758 $( '.notice.is-dismissible' ).each( function() { 759 759 var $el = $( this ), 760 $button = $( '<button type="button" class="notice-dismiss"><span class="screen-reader-text"></span></button>' ), 761 btnText = commonL10n.dismiss || ''; 760 $button = $( '<button type="button" class="notice-dismiss"><span class="screen-reader-text"></span></button>' ); 762 761 763 762 // Ensure plain text. 764 $button.find( '.screen-reader-text' ).text( btnText);763 $button.find( '.screen-reader-text' ).text( __( 'Dismiss this notice.' ) ); 765 764 $button.on( 'click.wp-dismiss-notice', function( event ) { 766 765 event.preventDefault(); … … 1560 1559 $document.on( 'wp-menu-state-set wp-collapse-menu', function( event, eventData ) { 1561 1560 var $collapseButton = $( '#collapse-button' ), 1562 ariaExpanded = 'true', 1563 ariaLabelText = commonL10n.collapseMenu; 1561 ariaExpanded, ariaLabelText; 1564 1562 1565 1563 if ( 'folded' === eventData.state ) { 1566 1564 ariaExpanded = 'false'; 1567 ariaLabelText = commonL10n.expandMenu; 1565 ariaLabelText = __( 'Expand Main menu' ); 1566 } else { 1567 ariaExpanded = 'true'; 1568 ariaLabelText = __( 'Collapse Main menu' ); 1568 1569 } 1569 1570 -
trunk/src/wp-includes/script-loader.php
r48266 r48267 609 609 610 610 $scripts->add( 'common', "/wp-admin/js/common$suffix.js", array( 'jquery', 'hoverIntent', 'utils' ), false, 1 ); 611 did_action( 'init' ) && $scripts->localize( 612 'common', 613 'commonL10n', 614 array( 615 'warnDelete' => __( "You are about to permanently delete these items from your site.\nThis action cannot be undone.\n 'Cancel' to stop, 'OK' to delete." ), 616 'dismiss' => __( 'Dismiss this notice.' ), 617 'collapseMenu' => __( 'Collapse Main menu' ), 618 'expandMenu' => __( 'Expand Main menu' ), 619 ) 620 ); 611 $scripts->set_translations( 'common' ); 621 612 622 613 $scripts->add( 'wp-sanitize', "/wp-includes/js/wp-sanitize$suffix.js", array(), false, 1 ); … … 810 801 // Masonry v2 depended on jQuery. v3 does not. The older jquery-masonry handle is a shiv. 811 802 // It sets jQuery as a dependency, as the theme may have been implicitly loading it this way. 812 $scripts->add( 'imagesloaded', '/wp-includes/js/imagesloaded.min.js', array(), ' 4.1.4', 1 );813 $scripts->add( 'masonry', '/wp-includes/js/masonry.min.js', array( 'imagesloaded' ), ' 4.2.2', 1 );803 $scripts->add( 'imagesloaded', '/wp-includes/js/imagesloaded.min.js', array(), '3.2.0', 1 ); 804 $scripts->add( 'masonry', '/wp-includes/js/masonry.min.js', array( 'imagesloaded' ), '3.3.2', 1 ); 814 805 $scripts->add( 'jquery-masonry', "/wp-includes/js/jquery/jquery.masonry$dev_suffix.js", array( 'jquery', 'masonry' ), '3.1.2b', 1 ); 815 806
Note: See TracChangeset
for help on using the changeset viewer.