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

View File

@@ -359,10 +359,14 @@ require_once ABSPATH . 'wp-admin/admin-header.php';
<div class="wrap">
<h1><?php esc_html_e( 'All Settings' ); ?></h1>
<div class="notice notice-warning">
<p><strong><?php _e( 'Warning:' ); ?></strong> <?php _e( 'This page allows direct access to your site settings. You can break things here. Please be cautious!' ); ?></p>
</div>
<?php
wp_admin_notice(
'<strong>' . __( 'Warning:' ) . '</strong> ' . __( 'This page allows direct access to your site settings. You can break things here. Please be cautious!' ),
array(
'type' => 'warning',
)
);
?>
<form name="form" action="options.php" method="post" id="all-options">
<?php wp_nonce_field( 'options-options' ); ?>
<input type="hidden" name="action" value="update" />