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

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

Props costdev, joedolson.
See #57791.

git-svn-id: https://develop.svn.wordpress.org/trunk@56571 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Joe Dolson
2023-09-14 01:11:29 +00:00
parent 3cefc7c7ff
commit fa21528a9a
13 changed files with 185 additions and 116 deletions

View File

@@ -2076,9 +2076,16 @@ class WP_Posts_List_Table extends WP_List_Table {
<input type="hidden" name="post_author" value="<?php echo esc_attr( $post->post_author ); ?>" />
<?php endif; ?>
<div class="notice notice-error notice-alt inline hidden">
<p class="error"></p>
</div>
<?php
wp_admin_notice(
'<p class="error"></p>',
array(
'type' => 'error',
'additional_classes' => array( 'notice-alt', 'inline', 'hidden' ),
'paragraph_wrap' => false,
)
);
?>
</div>
</div> <!-- end of .inline-edit-wrapper -->