mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
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:
@@ -440,12 +440,29 @@ if ( isset( $post_new_file ) && current_user_can( $post_type_object->cap->create
|
||||
|
||||
<hr class="wp-header-end">
|
||||
|
||||
<?php if ( $notice ) : ?>
|
||||
<div id="notice" class="notice notice-warning"><p id="has-newer-autosave"><?php echo $notice; ?></p></div>
|
||||
<?php endif; ?>
|
||||
<?php if ( $message ) : ?>
|
||||
<div id="message" class="updated notice notice-success is-dismissible"><p><?php echo $message; ?></p></div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
if ( $notice ) :
|
||||
wp_admin_notice(
|
||||
'<p id="has-newer-autosave">' . $notice . '</p>',
|
||||
array(
|
||||
'type' => 'warning',
|
||||
'id' => 'notice',
|
||||
'paragraph_wrap' => false,
|
||||
)
|
||||
);
|
||||
endif;
|
||||
if ( $message ) :
|
||||
wp_admin_notice(
|
||||
$message,
|
||||
array(
|
||||
'type' => 'success',
|
||||
'dismissible' => true,
|
||||
'id' => 'message',
|
||||
'additional_classes' => array( 'updated' ),
|
||||
)
|
||||
);
|
||||
endif;
|
||||
?>
|
||||
<div id="lost-connection-notice" class="error hidden">
|
||||
<p><span class="spinner"></span> <?php _e( '<strong>Connection lost.</strong> Saving has been disabled until you are reconnected.' ); ?>
|
||||
<span class="hide-if-no-sessionstorage"><?php _e( 'This post is being backed up in your browser, just in case.' ); ?></span>
|
||||
|
||||
Reference in New Issue
Block a user