Make WordPress Core


Ignore:
Timestamp:
08/17/2023 09:01:17 PM (6 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-new.php

    r55894 r56409  
    193193<?php
    194194if ( ! empty( $messages ) ) {
     195    $notice_args = array(
     196        'type'        => 'success',
     197        'dismissible' => true,
     198        'id'          => 'message',
     199    );
     200
    195201    foreach ( $messages as $msg ) {
    196         echo '<div id="message" class="notice notice-success is-dismissible"><p>' . $msg . '</p></div>';
     202        wp_admin_notice( $msg, $notice_args );
    197203    }
    198204}
Note: See TracChangeset for help on using the changeset viewer.