diff --git a/src/wp-admin/admin-header.php b/src/wp-admin/admin-header.php index 5f0fb75916..805546bbc6 100644 --- a/src/wp-admin/admin-header.php +++ b/src/wp-admin/admin-header.php @@ -52,6 +52,11 @@ if ( $admin_title == $title ) { $admin_title = sprintf( __( '%1$s ‹ %2$s — WordPress' ), $title, $admin_title ); } +if ( wp_is_recovery_mode() ) { + /* translators: %s: Admin screen title. */ + $admin_title = sprintf( __( '%s — Recovery Mode' ), $admin_title ); +} + /** * Filters the title tag content for an admin page. * diff --git a/src/wp-admin/css/colors/_admin.scss b/src/wp-admin/css/colors/_admin.scss index 6e064a04a1..bd1f3bd9d8 100644 --- a/src/wp-admin/css/colors/_admin.scss +++ b/src/wp-admin/css/colors/_admin.scss @@ -348,6 +348,26 @@ ul#adminmenu > li.current > a.current:after { background: $adminbar-input-background; } +/* Admin Bar: recovery mode */ + +#wpadminbar #wp-admin-bar-recovery-mode { + color: $adminbar-recovery-exit-text; + background-color: $adminbar-recovery-exit-background; +} + +#wpadminbar #wp-admin-bar-recovery-mode .ab-item, +#wpadminbar #wp-admin-bar-recovery-mode a.ab-item { + color: $adminbar-recovery-exit-text; +} + +#wpadminbar .ab-top-menu > #wp-admin-bar-recovery-mode.hover >.ab-item, +#wpadminbar.nojq .quicklinks .ab-top-menu > #wp-admin-bar-recovery-mode > .ab-item:focus, +#wpadminbar:not(.mobile) .ab-top-menu > #wp-admin-bar-recovery-mode:hover > .ab-item, +#wpadminbar:not(.mobile) .ab-top-menu > #wp-admin-bar-recovery-mode > .ab-item:focus { + color: $adminbar-recovery-exit-text; + background-color: $adminbar-recovery-exit-background-alt; +} + /* Admin Bar: my account */ #wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar > a img { diff --git a/src/wp-admin/css/colors/_variables.scss b/src/wp-admin/css/colors/_variables.scss index c203f1b2d5..91b57cce23 100644 --- a/src/wp-admin/css/colors/_variables.scss +++ b/src/wp-admin/css/colors/_variables.scss @@ -55,4 +55,8 @@ $menu-collapse-focus-icon: $menu-highlight-icon !default; $adminbar-avatar-frame: lighten( $menu-background, 7% ) !default; $adminbar-input-background: lighten( $menu-background, 7% ) !default; +$adminbar-recovery-exit-text: $menu-bubble-text !default; +$adminbar-recovery-exit-background: $menu-bubble-background !default; +$adminbar-recovery-exit-background-alt: mix(black, $adminbar-recovery-exit-background, 10%) !default; + $menu-customizer-text: mix( $base-color, $text-color, 40% ) !default; diff --git a/src/wp-admin/includes/admin-filters.php b/src/wp-admin/includes/admin-filters.php index 3407e93171..06bb612dd9 100644 --- a/src/wp-admin/includes/admin-filters.php +++ b/src/wp-admin/includes/admin-filters.php @@ -120,6 +120,7 @@ add_action( 'admin_notices', 'update_nag', 3 ); add_action( 'admin_notices', 'paused_plugins_notice', 5 ); add_action( 'admin_notices', 'paused_themes_notice', 5 ); add_action( 'admin_notices', 'maintenance_nag', 10 ); +add_action( 'admin_notices', 'wp_recovery_mode_nag', 1 ); add_filter( 'update_footer', 'core_update_footer' ); diff --git a/src/wp-admin/includes/update.php b/src/wp-admin/includes/update.php index 6c7d3b58ce..9c365ff423 100644 --- a/src/wp-admin/includes/update.php +++ b/src/wp-admin/includes/update.php @@ -829,3 +829,22 @@ function wp_print_update_row_templates() { +
+

+ +

+
+ is_initialized = true; + add_action( 'wp_logout', array( $this, 'exit_recovery_mode' ) ); add_action( 'login_form_' . self::EXIT_ACTION, array( $this, 'handle_exit_recovery_mode' ) ); if ( defined( 'WP_RECOVERY_MODE_SESSION_ID' ) ) { diff --git a/src/wp-includes/css/admin-bar.css b/src/wp-includes/css/admin-bar.css index ae35741489..295fbec07e 100644 --- a/src/wp-includes/css/admin-bar.css +++ b/src/wp-includes/css/admin-bar.css @@ -384,6 +384,22 @@ html:lang(he-il) .rtl #wpadminbar * { box-shadow: none; } +/** + * Recovery Mode + */ +#wpadminbar #wp-admin-bar-recovery-mode { + color: #fff; + background-color: #ca4a1f; +} + +#wpadminbar .ab-top-menu > #wp-admin-bar-recovery-mode.hover >.ab-item, +#wpadminbar.nojq .quicklinks .ab-top-menu > #wp-admin-bar-recovery-mode > .ab-item:focus, +#wpadminbar:not(.mobile) .ab-top-menu > #wp-admin-bar-recovery-mode:hover > .ab-item, +#wpadminbar:not(.mobile) .ab-top-menu > #wp-admin-bar-recovery-mode > .ab-item:focus { + color: #fff; + background-color: #c0461e; +} + /** * My Account */ diff --git a/src/wp-login.php b/src/wp-login.php index 10eb813a7a..53c56945a4 100644 --- a/src/wp-login.php +++ b/src/wp-login.php @@ -64,6 +64,11 @@ function login_header( $title = 'Log In', $message = '', $wp_error = null ) { /* translators: Login screen title. 1: Login screen name, 2: Network or site name */ $login_title = sprintf( __( '%1$s ‹ %2$s — WordPress' ), $title, $login_title ); + if ( wp_is_recovery_mode() ) { + /* translators: %s: Login screen title. */ + $login_title = sprintf( __( '%s — Recovery Mode' ), $login_title ); + } + /** * Filters the title tag content for login page. *