Make WordPress Core

Ticket #27418: 27418.patch

File 27418.patch, 5.5 KB (added by iseulde, 11 years ago)
  • src/wp-admin/css/common.css

     
    550550        margin: 10px 20px 0 2px;
    551551}
    552552
    553 div.updated,
    554 div.error {
    555         padding: 0 0.6em;
    556         margin: 5px 15px 2px;
    557 }
    558 
    559 div.updated p,
    560 div.error p {
    561         margin: 0.5em 0;
    562         padding: 2px;
    563 }
    564 
    565 .wrap div.updated,
    566 .wrap div.error,
    567 .media-upload-form div.error {
    568         margin: 5px 0 15px;
    569 }
    570 
    571 div.updated {
    572         border-left: 4px solid #7ad03a;
    573         padding: 1px 12px;
    574         background-color: #fff;
    575         -webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1);
    576         box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1);
    577 }
    578 
    579 div.error {
    580         border-left: 4px solid #dd3d36;
    581         background: #fff;
    582         -webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1);
    583         box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1);
    584         padding: 1px 12px;
    585 }
    586 
    587553.attention {
    588554        color: #2ea2cc;
    589555}
     
    12471213
    12481214}
    12491215
    1250 
    12511216/*------------------------------------------------------------------------------
    12521217  4.0 - Notifications
    12531218------------------------------------------------------------------------------*/
    12541219
     1220.notice,
     1221div.updated,
     1222div.error {
     1223        background: #fff;
     1224        border-left: 4px solid #fff;
     1225        -webkit-box-shadow: 0 1px 1px 0 rgba( 0, 0, 0, 0.1 );
     1226        box-shadow: 0 1px 1px 0 rgba( 0, 0, 0, 0.1 );
     1227        margin: 5px 15px 2px;
     1228        padding: 1px 12px;
     1229}
     1230
     1231.notice p,
     1232div.updated p,
     1233div.error p {
     1234        margin: 0.5em 0;
     1235        padding: 2px;
     1236}
     1237
     1238.notice-success,
     1239div.updated {
     1240     border-color: #7ad03a;
     1241}
     1242
     1243.notice-warning {
     1244    border-color: #ffba00;
     1245}
     1246
     1247.notice-error,
     1248div.error {
     1249    border-color: #dd3d36;
     1250}
     1251
     1252.notice-info {
     1253    border-color: #2ea2cc;
     1254}
     1255
     1256.wrap .notice,
     1257.wrap div.updated,
     1258.wrap div.error,
     1259.media-upload-form .notice,
     1260.media-upload-form div.error {
     1261        margin: 5px 0 15px;
     1262}
     1263
    12551264#update-nag,
    12561265.update-nag {
    12571266        display: inline-block;
  • src/wp-admin/edit-form-advanced.php

     
    388388        echo ' <a href="' . esc_url( admin_url( $post_new_file ) ) . '" class="add-new-h2">' . esc_html( $post_type_object->labels->add_new ) . '</a>';
    389389?></h2>
    390390<?php if ( $notice ) : ?>
    391 <div id="notice" class="error"><p id="has-newer-autosave"><?php echo $notice ?></p></div>
     391<div id="notice" class="notice notice-warning"><p id="has-newer-autosave"><?php echo $notice ?></p></div>
    392392<?php endif; ?>
    393393<?php if ( $message ) : ?>
    394394<div id="message" class="updated"><p><?php echo $message; ?></p></div>
  • src/wp-admin/includes/plugin-install.php

     
    500500        <div id="section-holder" class="wrap">
    501501        <?php
    502502                if ( ! empty( $api->tested ) && version_compare( substr( $GLOBALS['wp_version'], 0, strlen( $api->tested ) ), $api->tested, '>' ) ) {
    503                         echo '<div class="error"><p>' . __('<strong>Warning:</strong> This plugin has <strong>not been tested</strong> with your current version of WordPress.') . '</p></div>';
     503                        echo '<div class="notice notice-warning"><p>' . __('<strong>Warning:</strong> This plugin has <strong>not been tested</strong> with your current version of WordPress.') . '</p></div>';
    504504                } else if ( ! empty( $api->requires ) && version_compare( substr( $GLOBALS['wp_version'], 0, strlen( $api->requires ) ), $api->requires, '<' ) ) {
    505                         echo '<div class="error"><p>' . __('<strong>Warning:</strong> This plugin has <strong>not been marked as compatible</strong> with your version of WordPress.') . '</p></div>';
     505                        echo '<div class="notice notice-warning"><p>' . __('<strong>Warning:</strong> This plugin has <strong>not been marked as compatible</strong> with your version of WordPress.') . '</p></div>';
    506506                }
    507507
    508508                foreach ( (array) $api->sections as $section_name => $content ) {
  • src/wp-admin/includes/template.php

     
    20872087 */
    20882088function _local_storage_notice() {
    20892089        ?>
    2090         <div id="local-storage-notice" class="hidden">
     2090        <div id="local-storage-notice" class="hidden notice">
    20912091        <p class="local-restore">
    20922092                <?php _e('The backup of this post in your browser is different from the version below.'); ?>
    20932093                <a class="restore-backup" href="#"><?php _e('Restore the backup.'); ?></a>
  • src/wp-includes/js/autosave.js

     
    345345                                };
    346346
    347347                                $notice = $( '#local-storage-notice' );
    348                                 $('.wrap h2').first().after( $notice.addClass( 'updated' ).show() );
     348                                $('.wrap h2').first().after( $notice.addClass( 'notice-warning' ).show() );
    349349
    350350                                $notice.on( 'click.autosave-local', function( event ) {
    351351                                        var $target = $( event.target );
     
    354354                                                restorePost( restorePostData );
    355355                                                $target.parent().hide();
    356356                                                $(this).find( 'p.undo-restore' ).show();
     357                                                $notice.removeClass( 'notice-warning' ).addClass( 'notice-success' );
    357358                                        } else if ( $target.hasClass( 'undo-restore-backup' ) ) {
    358359                                                restorePost( undoPostData );
    359360                                                $target.parent().hide();
    360361                                                $(this).find( 'p.local-restore' ).show();
     362                                                $notice.removeClass( 'notice-success' ).addClass( 'notice-warning' );
    361363                                        }
    362364
    363365                                        event.preventDefault();