Make WordPress Core


Ignore:
Timestamp:
08/17/2023 09:01:17 PM (7 months ago)
Author:
joedolson
Message:

Administration: Apply admin notice functions in multisite.

Use wp_get_admin_notice and wp_admin_notice to handle multisite settings notices.

Props costdev.
See #57791.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/network/site-info.php

    r55418 r56409  
    147147
    148148if ( ! empty( $messages ) ) {
     149    $notice_args = array(
     150        'type'        => 'success',
     151        'dismissible' => true,
     152        'id'          => 'message',
     153    );
     154
    149155    foreach ( $messages as $msg ) {
    150         echo '<div id="message" class="notice notice-success is-dismissible"><p>' . $msg . '</p></div>';
     156        wp_admin_notice( $msg, $notice_args );
    151157    }
    152158}
Note: See TracChangeset for help on using the changeset viewer.