WordPress.org

Make WordPress Core

Ticket #39213: 39213.patch

File 39213.patch, 12.1 KB (added by marksabbath, 21 months ago)
  • src/wp-admin/my-sites.php

    diff --git src/wp-admin/my-sites.php src/wp-admin/my-sites.php
    index 588afb06a0..ef945c40cc 100644
    get_current_screen()->set_help_sidebar( 
    5555require_once( ABSPATH . 'wp-admin/admin-header.php' );
    5656
    5757if ( $updated ) { ?>
    58         <div id="message" class="updated notice is-dismissible"><p><strong><?php _e( 'Settings saved.' ); ?></strong></p></div>
     58        <div class="notice notice-success is-dismissible"><p><strong><?php _e( 'Settings saved.' ); ?></strong></p></div>
    5959<?php } ?>
    6060
    6161<div class="wrap">
    if ( in_array( get_site_option( 'registration' ), array( 'all', 'blog' ) ) ) { 
    7373}
    7474
    7575if ( empty( $blogs ) ) :
    76         echo '<p>';
    77         _e( 'You must be a member of at least one site to use this page.' );
    78         echo '</p>';
     76        ?>
     77        <div class="notice notice-error is-dismissible"><p><strong><?php _e( 'You must be a member of at least one site to use this page.' ); ?></strong></p></div>
     78        <?php
    7979else :
    8080?>
    8181
  • src/wp-admin/network/settings.php

    diff --git src/wp-admin/network/settings.php src/wp-admin/network/settings.php
    index a935a14647..ac90d52701 100644
    if ( $_POST ) { 
    138138include( ABSPATH . 'wp-admin/admin-header.php' );
    139139
    140140if ( isset( $_GET['updated'] ) ) {
    141         ?><div id="message" class="updated notice is-dismissible"><p><?php _e( 'Settings saved.' ); ?></p></div>
     141        ?><div class="notice notice-success is-dismissible"><p><?php _e( 'Settings saved.' ); ?></p></div>
    142142        <?php
    143143}
    144144?>
    if ( isset( $_GET['updated'] ) ) { 
    167167                                        $new_admin_email = get_site_option( 'new_admin_email' );
    168168                                        if ( $new_admin_email && $new_admin_email != get_site_option( 'admin_email' ) ) :
    169169                                        ?>
    170                                                 <div class="updated inline">
     170                                                <div class="notice notice-warning is-dismissible">
    171171                                                <p>
    172172                                                <?php
    173173                                                        printf(
  • src/wp-admin/network/site-info.php

    diff --git src/wp-admin/network/site-info.php src/wp-admin/network/site-info.php
    index 83e05ae867..6cc8e37f69 100644
    network_edit_site_nav( 
    144144
    145145if ( ! empty( $messages ) ) {
    146146        foreach ( $messages as $msg ) {
    147                 echo '<div id="message" class="updated notice is-dismissible"><p>' . $msg . '</p></div>';
     147                echo '<div class="notice notice-success is-dismissible"><p>' . $msg . '</p></div>';
    148148        }
    149149}
    150150?>
    if ( ! empty( $messages ) ) { 
    193193                        <fieldset>
    194194                        <legend class="screen-reader-text"><?php _e( 'Set site attributes' ); ?></legend>
    195195                        <?php foreach ( $attribute_fields as $field_key => $field_label ) : ?>
    196                                 <label><input type="checkbox" name="blog[<?php echo $field_key; ?>]" value="1" 
     196                                <label><input type="checkbox" name="blog[<?php echo $field_key; ?>]" value="1"
    197197                                                                                                                                        <?php
    198198                                                                                                                                        checked( (bool) $details->$field_key, true );
    199199                                                                                                                                        disabled( ! in_array( $details->$field_key, array( 0, 1 ) ) );
  • src/wp-admin/network/site-settings.php

    diff --git src/wp-admin/network/site-settings.php src/wp-admin/network/site-settings.php
    index 488a541abc..a7d5a31705 100644
    network_edit_site_nav( 
    103103
    104104if ( ! empty( $messages ) ) {
    105105        foreach ( $messages as $msg ) {
    106                 echo '<div id="message" class="updated notice is-dismissible"><p>' . $msg . '</p></div>';
     106                echo '<div class="notice notice-success is-dismissible"><p>' . $msg . '</p></div>';
    107107        }
    108108}
    109109?>
  • src/wp-admin/network/site-themes.php

    diff --git src/wp-admin/network/site-themes.php src/wp-admin/network/site-themes.php
    index 497de2aa98..ac74bcd736 100644
    if ( isset( $_GET['enabled'] ) ) { 
    192192        } else {
    193193                $message = _n( '%s theme enabled.', '%s themes enabled.', $enabled );
    194194        }
    195         echo '<div id="message" class="updated notice is-dismissible"><p>' . sprintf( $message, number_format_i18n( $enabled ) ) . '</p></div>';
     195        echo '<div class="notice notice-success is-dismissible"><p>' . sprintf( $message, number_format_i18n( $enabled ) ) . '</p></div>';
    196196} elseif ( isset( $_GET['disabled'] ) ) {
    197197        $disabled = absint( $_GET['disabled'] );
    198198        if ( 1 == $disabled ) {
    if ( isset( $_GET['enabled'] ) ) { 
    200200        } else {
    201201                $message = _n( '%s theme disabled.', '%s themes disabled.', $disabled );
    202202        }
    203         echo '<div id="message" class="updated notice is-dismissible"><p>' . sprintf( $message, number_format_i18n( $disabled ) ) . '</p></div>';
     203        echo '<div class="notice notice-success is-dismissible"><p>' . sprintf( $message, number_format_i18n( $disabled ) ) . '</p></div>';
    204204} elseif ( isset( $_GET['error'] ) && 'none' == $_GET['error'] ) {
    205         echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'No theme selected.' ) . '</p></div>';
     205        echo '<div class="notice notice-error is-dismissible"><p>' . __( 'No theme selected.' ) . '</p></div>';
    206206}
    207207?>
    208208
  • src/wp-admin/network/site-users.php

    diff --git src/wp-admin/network/site-users.php src/wp-admin/network/site-users.php
    index 86f858ec99..2e6a726b55 100644
    network_edit_site_nav( 
    236236if ( isset( $_GET['update'] ) ) :
    237237        switch ( $_GET['update'] ) {
    238238                case 'adduser':
    239                         echo '<div id="message" class="updated notice is-dismissible"><p>' . __( 'User added.' ) . '</p></div>';
     239                        echo '<div class="notice notice-success is-dismissible"><p>' . __( 'User added.' ) . '</p></div>';
    240240                        break;
    241241                case 'err_add_member':
    242                         echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'User is already a member of this site.' ) . '</p></div>';
     242                        echo '<div class="notice notice-error is-dismissible"><p>' . __( 'User is already a member of this site.' ) . '</p></div>';
    243243                        break;
    244244                case 'err_add_fail':
    245                         echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'User could not be added to this site.' ) . '</p></div>';
     245                        echo '<div class="notice notice-error is-dismissible"><p>' . __( 'User could not be added to this site.' ) . '</p></div>';
    246246                        break;
    247247                case 'err_add_notfound':
    248                         echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'Enter the username of an existing user.' ) . '</p></div>';
     248                        echo '<div class="notice notice-error is-dismissible"><p>' . __( 'Enter the username of an existing user.' ) . '</p></div>';
    249249                        break;
    250250                case 'promote':
    251                         echo '<div id="message" class="updated notice is-dismissible"><p>' . __( 'Changed roles.' ) . '</p></div>';
     251                        echo '<div class="notice notice-success is-dismissible"><p>' . __( 'Changed roles.' ) . '</p></div>';
    252252                        break;
    253253                case 'err_promote':
    254                         echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'Select a user to change role.' ) . '</p></div>';
     254                        echo '<div class="notice notice-error is-dismissible"><p>' . __( 'Select a user to change role.' ) . '</p></div>';
    255255                        break;
    256256                case 'remove':
    257                         echo '<div id="message" class="updated notice is-dismissible"><p>' . __( 'User removed from this site.' ) . '</p></div>';
     257                        echo '<div class="notice notice-success is-dismissible"><p>' . __( 'User removed from this site.' ) . '</p></div>';
    258258                        break;
    259259                case 'err_remove':
    260                         echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'Select a user to remove.' ) . '</p></div>';
     260                        echo '<div class="notice notice-error is-dismissible"><p>' . __( 'Select a user to remove.' ) . '</p></div>';
    261261                        break;
    262262                case 'newuser':
    263                         echo '<div id="message" class="updated notice is-dismissible"><p>' . __( 'User created.' ) . '</p></div>';
     263                        echo '<div class="notice notice-success is-dismissible"><p>' . __( 'User created.' ) . '</p></div>';
    264264                        break;
    265265                case 'err_new':
    266                         echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'Enter the username and email.' ) . '</p></div>';
     266                        echo '<div class="notice notice-error is-dismissible"><p>' . __( 'Enter the username and email.' ) . '</p></div>';
    267267                        break;
    268268                case 'err_new_dup':
    269                         echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'Duplicated username or email address.' ) . '</p></div>';
     269                        echo '<div class="notice notice-error is-dismissible"><p>' . __( 'Duplicated username or email address.' ) . '</p></div>';
    270270                        break;
    271271        }
    272272endif;
  • src/wp-admin/network/sites.php

    diff --git src/wp-admin/network/sites.php src/wp-admin/network/sites.php
    index b5b55bded5..ab5cc6fa55 100644
    if ( isset( $_GET['updated'] ) ) { 
    330330        }
    331331
    332332        if ( ! empty( $msg ) ) {
    333                 $msg = '<div id="message" class="updated notice is-dismissible"><p>' . $msg . '</p></div>';
     333                $msg = '<div class="notice notice-success is-dismissible"><p>' . $msg . '</p></div>';
    334334        }
    335335}
    336336
  • src/wp-admin/network/themes.php

    diff --git src/wp-admin/network/themes.php src/wp-admin/network/themes.php
    index fbfa8b46b7..757ad2f351 100644
    if ( isset( $_GET['enabled'] ) ) { 
    286286        } else {
    287287                $message = _n( '%s theme enabled.', '%s themes enabled.', $enabled );
    288288        }
    289         echo '<div id="message" class="updated notice is-dismissible"><p>' . sprintf( $message, number_format_i18n( $enabled ) ) . '</p></div>';
     289        echo '<div id="message" class="notice notice-updated is-dismissible"><p>' . sprintf( $message, number_format_i18n( $enabled ) ) . '</p></div>';
    290290} elseif ( isset( $_GET['disabled'] ) ) {
    291291        $disabled = absint( $_GET['disabled'] );
    292292        if ( 1 == $disabled ) {
    if ( isset( $_GET['enabled'] ) ) { 
    294294        } else {
    295295                $message = _n( '%s theme disabled.', '%s themes disabled.', $disabled );
    296296        }
    297         echo '<div id="message" class="updated notice is-dismissible"><p>' . sprintf( $message, number_format_i18n( $disabled ) ) . '</p></div>';
     297        echo '<div id="message" class="notice notice-updated is-dismissible"><p>' . sprintf( $message, number_format_i18n( $disabled ) ) . '</p></div>';
    298298} elseif ( isset( $_GET['deleted'] ) ) {
    299299        $deleted = absint( $_GET['deleted'] );
    300300        if ( 1 == $deleted ) {
    if ( isset( $_GET['enabled'] ) ) { 
    302302        } else {
    303303                $message = _n( '%s theme deleted.', '%s themes deleted.', $deleted );
    304304        }
    305         echo '<div id="message" class="updated notice is-dismissible"><p>' . sprintf( $message, number_format_i18n( $deleted ) ) . '</p></div>';
     305        echo '<div id="message" class="notice notice-updated is-dismissible"><p>' . sprintf( $message, number_format_i18n( $deleted ) ) . '</p></div>';
    306306} elseif ( isset( $_GET['error'] ) && 'none' == $_GET['error'] ) {
    307         echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'No theme selected.' ) . '</p></div>';
     307        echo '<div id="message" class="notice notice-error is-dismissible"><p>' . __( 'No theme selected.' ) . '</p></div>';
    308308} elseif ( isset( $_GET['error'] ) && 'main' == $_GET['error'] ) {
    309         echo '<div class="error notice is-dismissible"><p>' . __( 'You cannot delete a theme while it is active on the main site.' ) . '</p></div>';
     309        echo '<div class="notice notice-error is-dismissible"><p>' . __( 'You cannot delete a theme while it is active on the main site.' ) . '</p></div>';
    310310}
    311311
    312312?>
  • src/wp-admin/network/user-new.php

    diff --git src/wp-admin/network/user-new.php src/wp-admin/network/user-new.php
    index 5a230e069e..5dbcf922bb 100644
    require( ABSPATH . 'wp-admin/admin-header.php' ); ?> 
    104104<?php
    105105if ( ! empty( $messages ) ) {
    106106        foreach ( $messages as $msg ) {
    107                 echo '<div id="message" class="updated notice is-dismissible"><p>' . $msg . '</p></div>';
     107                echo '<div class="notice notice-success is-dismissible"><p>' . $msg . '</p></div>';
    108108        }
    109109}
    110110
    111111if ( isset( $add_user_errors ) && is_wp_error( $add_user_errors ) ) {
    112112?>
    113         <div class="error">
     113        <div class="notice notice-error is-dismissible">
    114114                <?php
    115115                foreach ( $add_user_errors->get_error_messages() as $message ) {
    116116                        echo "<p>$message</p>";
  • src/wp-admin/network/users.php

    diff --git src/wp-admin/network/users.php src/wp-admin/network/users.php
    index 3ae8f6f1b6..dc9ee898fa 100644
    require_once( ABSPATH . 'wp-admin/admin-header.php' ); 
    222222
    223223if ( isset( $_REQUEST['updated'] ) && $_REQUEST['updated'] == 'true' && ! empty( $_REQUEST['action'] ) ) {
    224224        ?>
    225         <div id="message" class="updated notice is-dismissible"><p>
     225        <div class="notice notice-success is-dismissible"><p>
    226226                <?php
    227227                switch ( $_REQUEST['action'] ) {
    228228                        case 'delete':