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

Add usages of `wp_admin_notice()` and `wp_get_admin_notice()` on `.notice-[type]` in the root level of `/wp-admin/`. Ongoing task to implement new function across core.

Props costdev, joedolson.
See #57791.

git-svn-id: https://develop.svn.wordpress.org/trunk@56570 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Joe Dolson
2023-09-14 00:52:45 +00:00
parent 96a7954ee6
commit 3cefc7c7ff
20 changed files with 434 additions and 225 deletions
+9 -3
View File
@@ -177,9 +177,15 @@ require_once ABSPATH . 'wp-admin/admin-header.php';
<hr class="wp-header-end">
<div class="notice notice-error hide-if-js">
<p><?php _e( 'The Privacy Settings require JavaScript.' ); ?></p>
</div>
<?php
wp_admin_notice(
__( 'The Privacy Settings require JavaScript.' ),
array(
'type' => 'error',
'additional_classes' => array( 'hide-if-js' ),
)
);
?>
<div class="privacy-settings-body hide-if-no-js">
<h2><?php _e( 'Privacy Settings' ); ?></h2>