Ticket #31233: 31233.diff
File 31233.diff, 1.6 KB (added by , 6 years ago) |
---|
-
src/wp-admin/js/common.js
373 373 $firstHeading.nextAll( 'div.updated, div.error, div.notice' ).addClass( 'below-h2' ); 374 374 $( 'div.updated, div.error, div.notice' ).not( '.below-h2, .inline' ).insertAfter( $firstHeading ); 375 375 376 // Make notices dismissable 377 $( 'div.updated, div.error, div.notice' ).each(function(){ 378 var $this = $(this), 379 text = commonL10n.dismiss || '', 380 $dismiss = $('<a href="#" class="dismiss"></a>'); 381 382 // Ensure plain text 383 $dismiss.text( text ); 384 385 $this.append( $dismiss ).on('click', function(e){ 386 e.preventDefault(); 387 $this.remove(); 388 }); 389 }); 390 376 391 // Init screen meta 377 392 screenMeta.init(); 378 393 -
src/wp-includes/script-loader.php
79 79 80 80 $scripts->add( 'common', "/wp-admin/js/common$suffix.js", array('jquery', 'hoverIntent', 'utils'), false, 1 ); 81 81 did_action( 'init' ) && $scripts->localize( 'common', 'commonL10n', array( 82 'warnDelete' => __("You are about to permanently delete the selected items.\n 'Cancel' to stop, 'OK' to delete.") 82 'warnDelete' => __("You are about to permanently delete the selected items.\n 'Cancel' to stop, 'OK' to delete."), 83 'dismiss' => __( 'Dismiss' ), 83 84 ) ); 84 85 85 86 $scripts->add( 'sack', "/wp-includes/js/tw-sack$suffix.js", array(), '1.6.1', 1 );