Make WordPress Core


Ignore:
Timestamp:
09/17/2023 03:31:32 PM (6 months ago)
Author:
joedolson
Message:

Administration: Use wp_admin_notice() more in wp-admin/.

Add additional usage of wp_admin_notice() in wp-admin/ on .error and miscellaneous usages previously overlooked.

Follow up to [56408], [56409], [56410], [56518], [56570], [56571], [56572], [56573], [56576], [56589], [56590], [56597], [56599].

Props costdev, joedolson.
See #57791.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/edit-tags.php

    r55412 r56600  
    349349<hr class="wp-header-end">
    350350
    351 <?php if ( $message ) : ?>
    352 <div id="message" class="<?php echo $class; ?> notice is-dismissible"><p><?php echo $message; ?></p></div>
    353     <?php
     351<?php
     352if ( $message ) :
     353    wp_admin_notice(
     354        $message,
     355        array(
     356            'id'                 => 'message',
     357            'additional_classes' => array( $class ),
     358            'dismissible'        => true,
     359        )
     360    );
    354361    $_SERVER['REQUEST_URI'] = remove_query_arg( array( 'message', 'error' ), $_SERVER['REQUEST_URI'] );
    355362endif;
Note: See TracChangeset for help on using the changeset viewer.