diff --git src/wp-admin/css/common.css src/wp-admin/css/common.css
index 6a1e9d7..e744649 100644
|
|
|
div.error { |
| 1280 | 1280 | padding: 1px 12px; |
| 1281 | 1281 | } |
| 1282 | 1282 | |
| | 1283 | .wrap div.dismiss { |
| | 1284 | padding-right: 38px; |
| | 1285 | position: relative; |
| | 1286 | } |
| | 1287 | |
| | 1288 | .wrap div.dismiss button.close { |
| | 1289 | background: none; |
| | 1290 | border: none; |
| | 1291 | color: #bbb; |
| | 1292 | margin: 2px; |
| | 1293 | padding: 0.5em; |
| | 1294 | position: absolute; |
| | 1295 | right: 0; |
| | 1296 | top: 0; |
| | 1297 | } |
| | 1298 | |
| | 1299 | @-moz-document url-prefix() { |
| | 1300 | .wrap div.dismiss button.close { |
| | 1301 | right: 1px; |
| | 1302 | top: 1px; |
| | 1303 | } |
| | 1304 | } |
| | 1305 | |
| | 1306 | .wrap div.dismiss button.close:hover { |
| | 1307 | color: #c00; |
| | 1308 | cursor: pointer; |
| | 1309 | } |
| | 1310 | |
| 1283 | 1311 | .notice p, |
| 1284 | 1312 | div.updated p, |
| 1285 | 1313 | div.error p, |
| … |
… |
img { |
| 3129 | 3157 | line-height: 175%; |
| 3130 | 3158 | } |
| 3131 | 3159 | |
| | 3160 | .wrap div.dismiss { |
| | 3161 | padding-right: 46px; |
| | 3162 | } |
| | 3163 | |
| | 3164 | .wrap div.dismiss button.close { |
| | 3165 | margin: 6px; |
| | 3166 | } |
| | 3167 | |
| 3132 | 3168 | .wrap .icon32 + h2 { |
| 3133 | 3169 | margin-top: -2px; |
| 3134 | 3170 | } |
diff --git src/wp-admin/edit-form-advanced.php src/wp-admin/edit-form-advanced.php
index 92f56b7..bc072e4 100644
|
|
|
if ( isset( $post_new_file ) && current_user_can( $post_type_object->cap->create |
| 410 | 410 | <div id="notice" class="notice notice-warning"><p id="has-newer-autosave"><?php echo $notice ?></p></div> |
| 411 | 411 | <?php endif; ?> |
| 412 | 412 | <?php if ( $message ) : ?> |
| 413 | | <div id="message" class="updated"><p><?php echo $message; ?></p></div> |
| | 413 | <div id="message" class="updated dismiss"><p><?php echo $message; ?></p></div> |
| 414 | 414 | <?php endif; ?> |
| 415 | 415 | <div id="lost-connection-notice" class="error hidden"> |
| 416 | 416 | <p><span class="spinner"></span> <?php _e( '<strong>Connection lost.</strong> Saving has been disabled until you’re reconnected.' ); ?> |
diff --git src/wp-admin/js/common.js src/wp-admin/js/common.js
index dda9247..bfe165a 100644
|
|
|
$(document).ready( function() { |
| 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 dismissible |
| | 377 | $( '.wrap div.dismiss' ).each( function() { |
| | 378 | var $this = $( this ), |
| | 379 | $button = $( '<button class="close hide-if-no-js"><span class="dashicons dashicons-dismiss"><span class="screen-reader-text"></span></span></button>' ), |
| | 380 | btnText = commonL10n.dismiss || ''; |
| | 381 | |
| | 382 | // Ensure plain text |
| | 383 | $button.find( '.screen-reader-text' ).text( btnText ); |
| | 384 | |
| | 385 | $this.append( $button ); |
| | 386 | |
| | 387 | $button.on( 'click.wp-dismiss-notice', function( event ) { |
| | 388 | event.preventDefault(); |
| | 389 | $this.fadeOut( 200 ); |
| | 390 | }); |
| | 391 | }); |
| | 392 | |
| 376 | 393 | // Init screen meta |
| 377 | 394 | screenMeta.init(); |
| 378 | 395 | |
diff --git src/wp-includes/script-loader.php src/wp-includes/script-loader.php
index d304498..2f42ed5 100644
|
|
|
function wp_default_scripts( &$scripts ) { |
| 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 this notice.' ) |
| 83 | 84 | ) ); |
| 84 | 85 | |
| 85 | 86 | $scripts->add( 'wp-a11y', "/wp-includes/js/wp-a11y$suffix.js", array( 'jquery' ), false, 1 ); |