mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-09 03:30:06 +00:00
Administration: Improve user experience and clarify when in recovery mode.
This changeset introduces several changes around usability when recovery mode is active: * Display a notice in the admin clarifying that the user is in recovery mode. * Use a highlight color for the admin bar link to exit recovery mode. * Exit recovery mode automatically when logging out. * Include a recovery mode indicator in the title tag. Props aandrewdixon, azaozz, dhanukanuwan, flixos90, henrywright, karmatosed, mapk, melchoyce, spacedmonkey, TimothyBlynJacobs, tinkerbelly. See #46608. git-svn-id: https://develop.svn.wordpress.org/trunk@45117 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -829,3 +829,22 @@ function wp_print_update_row_templates() {
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays a notice when the user is in recovery mode.
|
||||
*
|
||||
* @since 5.2.0
|
||||
*/
|
||||
function wp_recovery_mode_nag() {
|
||||
if ( ! wp_is_recovery_mode() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="notice notice-info">
|
||||
<p>
|
||||
<?php esc_html_e( 'You are in recovery mode. This means there may be an error with a theme or plugin. To exit recovery mode, log out or use the Exit button.' ); ?>
|
||||
</p>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user