WordPress.org

Make WordPress Core

Changeset 45530


Ignore:
Timestamp:
06/13/2019 04:04:39 PM (3 months ago)
Author:
azaozz
Message:

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

Props desrosj, karmatosed, chetan200891, afercia, afragen, garrett-eclipse.
Merges [45529] to the 5.2 branch.
Fixes #47070.

Location:
branches/5.2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.2

  • branches/5.2/src/wp-admin/includes/update.php

    r45185 r45530  
    842842    }
    843843
     844    $url = wp_login_url();
     845    $url = add_query_arg( 'action', WP_Recovery_Mode::EXIT_ACTION, $url );
     846    $url = wp_nonce_url( $url, WP_Recovery_Mode::EXIT_ACTION );
     847
    844848    ?>
    845849    <div class="notice notice-info">
    846850        <p>
    847             <?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.' ); ?>
     851            <?php
     852            printf(
     853                /* translators: %s: Recovery Mode exit link */
     854                __( '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>' ),
     855                esc_url( $url )
     856            );
     857            ?>
    848858        </p>
    849859    </div>
Note: See TracChangeset for help on using the changeset viewer.