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.

git-svn-id: https://develop.svn.wordpress.org/trunk@56600 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Joe Dolson
2023-09-17 15:31:32 +00:00
parent ce32693b3d
commit f058bd1217
15 changed files with 303 additions and 160 deletions

View File

@@ -29,7 +29,15 @@ if ( empty( $plugins ) ) {
?>
<div class="wrap">
<h1><?php echo esc_html( $title ); ?></h1>
<div id="message" class="error"><p><?php _e( 'No plugins are currently available.' ); ?></p></div>
<?php
wp_admin_notice(
__( 'No plugins are currently available.' ),
array(
'id' => 'message',
'additional_classes' => array( 'error' ),
)
);
?>
</div>
<?php
require_once ABSPATH . 'wp-admin/admin-footer.php';