Make WordPress Core

Ticket #30199: admin_notice_warning.diff

File admin_notice_warning.diff, 3.8 KB (added by wedi, 12 years ago)
  • wp-admin/css/common-rtl.css

    diff --git wp-admin/css/common-rtl.css wp-admin/css/common-rtl.css
    index 147effe..e21182e 100644
    code {  
    551551}
    552552
    553553div.updated,
     554div.warning,
    554555div.error {
    555556        padding: 0 0.6em;
    556557        margin: 5px 15px 2px;
    557558}
    558559
    559560div.updated p,
     561div.warning p,
    560562div.error p {
    561563        margin: 0.5em 0;
    562564        padding: 2px;
    563565}
    564566
    565567.wrap div.updated,
     568.wrap div.warning,
    566569.wrap div.error,
    567570.media-upload-form div.error {
    568571        margin: 5px 0 15px;
    div.updated {  
    576579        box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1);
    577580}
    578581
     582div.warning {
     583        border-right: 4px solid #ffba00;
     584        padding: 1px 12px;
     585        background-color: #fff;
     586        -webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1);
     587        box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1);
     588}
     589
    579590div.error {
    580591        border-right: 4px solid #dd3d36;
    581592        background: #fff;
    img {  
    31063117        }
    31073118
    31083119        /* Feedback Messages */
    3109         .wrap div.updated, .wrap div.error, .media-upload-form div.error {
     3120        .wrap div.updated, .wrap div.warning, .wrap div.error, .media-upload-form div.error {
    31103121                margin: 20px 0 10px 0;
    31113122                padding: 5px 10px;
    31123123                font-size: 14px;
  • wp-admin/css/common.css

    diff --git wp-admin/css/common.css wp-admin/css/common.css
    index 172f152..398de05 100644
    code {  
    551551}
    552552
    553553div.updated,
     554div.warning,
    554555div.error {
    555556        padding: 0 0.6em;
    556557        margin: 5px 15px 2px;
    557558}
    558559
    559560div.updated p,
     561div.warning p,
    560562div.error p {
    561563        margin: 0.5em 0;
    562564        padding: 2px;
    563565}
    564566
    565567.wrap div.updated,
     568.wrap div.warning,
    566569.wrap div.error,
    567570.media-upload-form div.error {
    568571        margin: 5px 0 15px;
    div.updated {  
    576579        box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1);
    577580}
    578581
     582div.warning {
     583        border-left: 4px solid #ffba00;
     584        padding: 1px 12px;
     585        background-color: #fff;
     586        -webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1);
     587        box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1);
     588}
     589
    579590div.error {
    580591        border-left: 4px solid #dd3d36;
    581592        background: #fff;
    img {  
    31063117        }
    31073118
    31083119        /* Feedback Messages */
    3109         .wrap div.updated, .wrap div.error, .media-upload-form div.error {
     3120        .wrap div.updated, .wrap div.warning, .wrap div.error, .media-upload-form div.error {
    31103121                margin: 20px 0 10px 0;
    31113122                padding: 5px 10px;
    31123123                font-size: 14px;
  • wp-admin/includes/template.php

    diff --git wp-admin/includes/template.php wp-admin/includes/template.php
    index 5304cf8..d7df5df 100644
    function do_settings_fields($page, $section) {  
    13131313 * @param string $setting Slug title of the setting to which this error applies
    13141314 * @param string $code Slug-name to identify the error. Used as part of 'id' attribute in HTML output.
    13151315 * @param string $message The formatted message text to display to the user (will be shown inside styled <div> and <p>)
    1316  * @param string $type The type of message it is, controls HTML class. Use 'error' or 'updated'.
     1316 * @param string $type The type of message it is, controls HTML class. Use 'error', 'updated' or, since 4.1.0, 'warning'.
    13171317 */
    13181318function add_settings_error( $setting, $code, $message, $type = 'error' ) {
    13191319        global $wp_settings_errors;
  • wp-admin/js/common.js

    diff --git wp-admin/js/common.js wp-admin/js/common.js
    index fe46474..0dfe4c3 100644
    $(document).ready( function() {  
    358358                });
    359359        }
    360360
    361         // Move .updated and .error alert boxes. Don't move boxes designed to be inline.
    362         $('div.wrap h2:first').nextAll('div.updated, div.error').addClass('below-h2');
    363         $('div.updated, div.error').not('.below-h2, .inline').insertAfter( $('div.wrap h2:first') );
     361        // Move .updated, .warning and .error alert boxes. Don't move boxes designed to be inline.
     362        $('div.wrap h2:first').nextAll('div.updated, div.warning, div.error').addClass('below-h2');
     363        $('div.updated, div.warning, div.error').not('.below-h2, .inline').insertAfter( $('div.wrap h2:first') );
    364364
    365365        // Init screen meta
    366366        screenMeta.init();