Make WordPress Core

Ticket #39213: 39213.4.diff

File 39213.4.diff, 13.8 KB (added by joedolson, 12 months ago)

Update to PR by robinwpdeveloper

  • src/wp-admin/my-sites.php

     
    5656require_once ABSPATH . 'wp-admin/admin-header.php';
    5757
    5858if ( $updated ) { ?>
    59         <div id="message" class="updated notice is-dismissible"><p><strong><?php _e( 'Settings saved.' ); ?></strong></p></div>
     59        <div id="message" class="notice notice-success is-dismissible"><p><strong><?php _e( 'Settings saved.' ); ?></strong></p></div>
    6060<?php } ?>
    6161
    6262<div class="wrap">
     
    7474}
    7575
    7676if ( empty( $blogs ) ) :
    77         echo '<p>';
    78         _e( 'You must be a member of at least one site to use this page.' );
    79         echo '</p>';
     77        ?>
     78        <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>
     79        <?php
    8080else :
    8181        ?>
    8282
  • src/wp-admin/network/settings.php

     
    138138require_once 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 id="message" class="notice notice-success is-dismissible"><p><?php _e( 'Settings saved.' ); ?></p></div>
    142142        <?php
    143143}
    144144?>
     
    167167                                        $new_admin_email = get_site_option( 'new_admin_email' );
    168168                                        if ( $new_admin_email && get_site_option( 'admin_email' ) !== $new_admin_email ) :
    169169                                                ?>
    170                                                 <div class="updated inline">
     170                                                <div class="notice notice-warning is-dismissible inline">
    171171                                                <p>
    172172                                                <?php
    173173                                                        printf(
  • src/wp-admin/network/site-info.php

     
    147147
    148148if ( ! empty( $messages ) ) {
    149149        foreach ( $messages as $msg ) {
    150                 echo '<div id="message" class="updated notice is-dismissible"><p>' . $msg . '</p></div>';
     150                echo '<div id="message" class="notice notice-success is-dismissible"><p>' . $msg . '</p></div>';
    151151        }
    152152}
    153153?>
  • src/wp-admin/network/site-new.php

     
    189189<?php
    190190if ( ! empty( $messages ) ) {
    191191        foreach ( $messages as $msg ) {
    192                 echo '<div id="message" class="updated notice is-dismissible"><p>' . $msg . '</p></div>';
     192                echo '<div id="message" class="notice notice-success is-dismissible"><p>' . $msg . '</p></div>';
    193193        }
    194194}
    195195?>
  • src/wp-admin/network/site-settings.php

     
    105105
    106106if ( ! empty( $messages ) ) {
    107107        foreach ( $messages as $msg ) {
    108                 echo '<div id="message" class="updated notice is-dismissible"><p>' . $msg . '</p></div>';
     108                echo '<div id="message" class="notice notice-success is-dismissible"><p>' . $msg . '</p></div>';
    109109        }
    110110}
    111111?>
  • src/wp-admin/network/site-themes.php

     
    195195                /* translators: %s: Number of themes. */
    196196                $message = _n( '%s theme enabled.', '%s themes enabled.', $enabled );
    197197        }
    198         echo '<div id="message" class="updated notice is-dismissible"><p>' . sprintf( $message, number_format_i18n( $enabled ) ) . '</p></div>';
     198        echo '<div id="message" class="notice notice-success is-dismissible"><p>' . sprintf( $message, number_format_i18n( $enabled ) ) . '</p></div>';
    199199} elseif ( isset( $_GET['disabled'] ) ) {
    200200        $disabled = absint( $_GET['disabled'] );
    201201        if ( 1 === $disabled ) {
     
    204204                /* translators: %s: Number of themes. */
    205205                $message = _n( '%s theme disabled.', '%s themes disabled.', $disabled );
    206206        }
    207         echo '<div id="message" class="updated notice is-dismissible"><p>' . sprintf( $message, number_format_i18n( $disabled ) ) . '</p></div>';
     207        echo '<div id="message" class="notice notice-success is-dismissible"><p>' . sprintf( $message, number_format_i18n( $disabled ) ) . '</p></div>';
    208208} elseif ( isset( $_GET['error'] ) && 'none' === $_GET['error'] ) {
    209         echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'No theme selected.' ) . '</p></div>';
     209        echo '<div id="message" class="notice notice-error is-dismissible"><p>' . __( 'No theme selected.' ) . '</p></div>';
    210210}
    211211?>
    212212
  • src/wp-admin/network/site-users.php

     
    235235if ( isset( $_GET['update'] ) ) :
    236236        switch ( $_GET['update'] ) {
    237237                case 'adduser':
    238                         echo '<div id="message" class="updated notice is-dismissible"><p>' . __( 'User added.' ) . '</p></div>';
     238                        echo '<div id="message" class="notice notice-success is-dismissible"><p>' . __( 'User added.' ) . '</p></div>';
    239239                        break;
    240240                case 'err_add_member':
    241                         echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'User is already a member of this site.' ) . '</p></div>';
     241                        echo '<div id="message" class="notice notice-error is-dismissible"><p>' . __( 'User is already a member of this site.' ) . '</p></div>';
    242242                        break;
    243243                case 'err_add_fail':
    244                         echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'User could not be added to this site.' ) . '</p></div>';
     244                        echo '<div id="message" class="notice notice-error is-dismissible"><p>' . __( 'User could not be added to this site.' ) . '</p></div>';
    245245                        break;
    246246                case 'err_add_notfound':
    247                         echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'Enter the username of an existing user.' ) . '</p></div>';
     247                        echo '<div id="message" class="notice notice-error is-dismissible"><p>' . __( 'Enter the username of an existing user.' ) . '</p></div>';
    248248                        break;
    249249                case 'promote':
    250                         echo '<div id="message" class="updated notice is-dismissible"><p>' . __( 'Changed roles.' ) . '</p></div>';
     250                        echo '<div id="message" class="notice notice-success is-dismissible"><p>' . __( 'Changed roles.' ) . '</p></div>';
    251251                        break;
    252252                case 'err_promote':
    253                         echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'Select a user to change role.' ) . '</p></div>';
     253                        echo '<div id="message" class="notice notice-error is-dismissible"><p>' . __( 'Select a user to change role.' ) . '</p></div>';
    254254                        break;
    255255                case 'remove':
    256                         echo '<div id="message" class="updated notice is-dismissible"><p>' . __( 'User removed from this site.' ) . '</p></div>';
     256                        echo '<div id="message" class="notice notice-success is-dismissible"><p>' . __( 'User removed from this site.' ) . '</p></div>';
    257257                        break;
    258258                case 'err_remove':
    259                         echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'Select a user to remove.' ) . '</p></div>';
     259                        echo '<div id="message" class="notice notice-error is-dismissible"><p>' . __( 'Select a user to remove.' ) . '</p></div>';
    260260                        break;
    261261                case 'newuser':
    262                         echo '<div id="message" class="updated notice is-dismissible"><p>' . __( 'User created.' ) . '</p></div>';
     262                        echo '<div id="message" class="notice notice-success is-dismissible"><p>' . __( 'User created.' ) . '</p></div>';
    263263                        break;
    264264                case 'err_new':
    265                         echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'Enter the username and email.' ) . '</p></div>';
     265                        echo '<div id="message" class="notice notice-error is-dismissible"><p>' . __( 'Enter the username and email.' ) . '</p></div>';
    266266                        break;
    267267                case 'err_new_dup':
    268                         echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'Duplicated username or email address.' ) . '</p></div>';
     268                        echo '<div id="message" class="notice notice-error is-dismissible"><p>' . __( 'Duplicated username or email address.' ) . '</p></div>';
    269269                        break;
    270270        }
    271271endif;
  • src/wp-admin/network/sites.php

     
    354354        }
    355355
    356356        if ( ! empty( $msg ) ) {
    357                 $msg = '<div id="message" class="updated notice is-dismissible"><p>' . $msg . '</p></div>';
     357                $msg = '<div id="message" class="notice notice-success is-dismissible"><p>' . $msg . '</p></div>';
    358358        }
    359359}
    360360
  • src/wp-admin/network/themes.php

     
    375375                /* translators: %s: Number of themes. */
    376376                $message = _n( '%s theme enabled.', '%s themes enabled.', $enabled );
    377377        }
    378         echo '<div id="message" class="updated notice is-dismissible"><p>' . sprintf( $message, number_format_i18n( $enabled ) ) . '</p></div>';
     378        echo '<div id="message" class="notice notice-updated is-dismissible"><p>' . sprintf( $message, number_format_i18n( $enabled ) ) . '</p></div>';
    379379} elseif ( isset( $_GET['disabled'] ) ) {
    380380        $disabled = absint( $_GET['disabled'] );
    381381        if ( 1 === $disabled ) {
     
    384384                /* translators: %s: Number of themes. */
    385385                $message = _n( '%s theme disabled.', '%s themes disabled.', $disabled );
    386386        }
    387         echo '<div id="message" class="updated notice is-dismissible"><p>' . sprintf( $message, number_format_i18n( $disabled ) ) . '</p></div>';
     387        echo '<div id="message" class="notice notice-updated is-dismissible"><p>' . sprintf( $message, number_format_i18n( $disabled ) ) . '</p></div>';
    388388} elseif ( isset( $_GET['deleted'] ) ) {
    389389        $deleted = absint( $_GET['deleted'] );
    390390        if ( 1 === $deleted ) {
     
    393393                /* translators: %s: Number of themes. */
    394394                $message = _n( '%s theme deleted.', '%s themes deleted.', $deleted );
    395395        }
    396         echo '<div id="message" class="updated notice is-dismissible"><p>' . sprintf( $message, number_format_i18n( $deleted ) ) . '</p></div>';
     396        echo '<div id="message" class="notice notice-success is-dismissible"><p>' . sprintf( $message, number_format_i18n( $deleted ) ) . '</p></div>';
    397397} elseif ( isset( $_GET['enabled-auto-update'] ) ) {
    398398        $enabled = absint( $_GET['enabled-auto-update'] );
    399399        if ( 1 === $enabled ) {
     
    402402                /* translators: %s: Number of themes. */
    403403                $message = _n( '%s theme will be auto-updated.', '%s themes will be auto-updated.', $enabled );
    404404        }
    405         echo '<div id="message" class="updated notice is-dismissible"><p>' . sprintf( $message, number_format_i18n( $enabled ) ) . '</p></div>';
     405        echo '<div id="message" class="notice notice-success is-dismissible"><p>' . sprintf( $message, number_format_i18n( $enabled ) ) . '</p></div>';
    406406} elseif ( isset( $_GET['disabled-auto-update'] ) ) {
    407407        $disabled = absint( $_GET['disabled-auto-update'] );
    408408        if ( 1 === $disabled ) {
     
    411411                /* translators: %s: Number of themes. */
    412412                $message = _n( '%s theme will no longer be auto-updated.', '%s themes will no longer be auto-updated.', $disabled );
    413413        }
    414         echo '<div id="message" class="updated notice is-dismissible"><p>' . sprintf( $message, number_format_i18n( $disabled ) ) . '</p></div>';
     414        echo '<div id="message" class="notice notice-success is-dismissible"><p>' . sprintf( $message, number_format_i18n( $disabled ) ) . '</p></div>';
    415415} elseif ( isset( $_GET['error'] ) && 'none' === $_GET['error'] ) {
    416         echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'No theme selected.' ) . '</p></div>';
     416        echo '<div id="message" class="notice notice-error is-dismissible"><p>' . __( 'No theme selected.' ) . '</p></div>';
    417417} elseif ( isset( $_GET['error'] ) && 'main' === $_GET['error'] ) {
    418         echo '<div class="error notice is-dismissible"><p>' . __( 'You cannot delete a theme while it is active on the main site.' ) . '</p></div>';
     418        echo '<div id="message" class="notice notice-error is-dismissible"><p>' . __( 'You cannot delete a theme while it is active on the main site.' ) . '</p></div>';
    419419}
    420420
    421421?>
  • src/wp-admin/network/user-new.php

     
    108108<h1 id="add-new-user"><?php _e( 'Add New User' ); ?></h1>
    109109<?php
    110110if ( ! empty( $messages ) ) {
     111        $i = 0;
    111112        foreach ( $messages as $msg ) {
    112                 echo '<div id="message" class="updated notice is-dismissible"><p>' . $msg . '</p></div>';
     113                $append = '';
     114                if ( 0 !== $i ) {
     115                        $append = '-' . (string) $i;
     116                }
     117                echo '<div id="message' . $append . '" class="notice notice-success is-dismissible"><p>' . $msg . '</p></div>';
     118                $i ++;
    113119        }
    114120}
    115121
    116122if ( isset( $add_user_errors ) && is_wp_error( $add_user_errors ) ) {
    117123        ?>
    118         <div class="error">
     124        <div id="message" class="notice notice-error is-dismissible">
    119125                <?php
    120126                foreach ( $add_user_errors->get_error_messages() as $message ) {
    121127                        echo "<p>$message</p>";
  • src/wp-admin/network/users.php

     
    255255
    256256if ( isset( $_REQUEST['updated'] ) && 'true' == $_REQUEST['updated'] && ! empty( $_REQUEST['action'] ) ) {
    257257        ?>
    258         <div id="message" class="updated notice is-dismissible"><p>
     258        <div id="message" class="notice notice-success is-dismissible"><p>
    259259                <?php
    260260                switch ( $_REQUEST['action'] ) {
    261261                        case 'delete':