Add a Recovery Mode Exit button to the notice. This fixes it in responsive view.

Props desrosj, karmatosed, chetan200891, afercia, afragen, garrett-eclipse.
Fixes #47070.

git-svn-id: https://develop.svn.wordpress.org/trunk@45529 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2019-06-13 15:59:58 +00:00
parent 2d4887f4c7
commit f16752240c

View File

@ -841,10 +841,20 @@ function wp_recovery_mode_nag() {
return;
}
$url = wp_login_url();
$url = add_query_arg( 'action', WP_Recovery_Mode::EXIT_ACTION, $url );
$url = wp_nonce_url( $url, WP_Recovery_Mode::EXIT_ACTION );
?>
<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.' ); ?>
<?php
printf(
/* translators: %s: Recovery Mode exit link */
__( '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. <a href="%s">Exit Recovery Mode</a>' ),
esc_url( $url )
);
?>
</p>
</div>
<?php