Make WordPress Core


Ignore:
Timestamp:
04/05/2019 04:59:34 PM (7 years ago)
Author:
flixos90
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/update.php

    r44980 r45117  
    830830        <?php
    831831}
     832
     833/**
     834 * Displays a notice when the user is in recovery mode.
     835 *
     836 * @since 5.2.0
     837 */
     838function wp_recovery_mode_nag() {
     839        if ( ! wp_is_recovery_mode() ) {
     840                return;
     841        }
     842
     843        ?>
     844        <div class="notice notice-info">
     845                <p>
     846                        <?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.' ); ?>
     847                </p>
     848        </div>
     849        <?php
     850}
Note: See TracChangeset for help on using the changeset viewer.