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/my-sites.php

    r55917 r56409  
    5656require_once ABSPATH . 'wp-admin/admin-header.php';
    5757
    58 if ( $updated ) { ?>
    59     <div id="message" class="notice notice-success is-dismissible"><p><strong><?php _e( 'Settings saved.' ); ?></strong></p></div>
    60 <?php } ?>
     58if ( $updated ) {
     59    wp_admin_notice(
     60        '<strong>' . __( 'Settings saved.' ) . '</strong>',
     61        array(
     62            'type'        => 'success',
     63            'dismissible' => true,
     64            'id'          => 'message',
     65        )
     66    );
     67}
     68?>
    6169
    6270<div class="wrap">
     
    7583
    7684if ( empty( $blogs ) ) :
     85    wp_admin_notice(
     86        '<strong>' . __( 'You must be a member of at least one site to use this page.' ) . '</strong>',
     87        array(
     88            'type'        => 'error',
     89            'dismissible' => true,
     90        )
     91    );
    7792    ?>
    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>
    7993    <?php
    8094else :
Note: See TracChangeset for help on using the changeset viewer.