Site health: Fix gathering the site data twice on non-English locales. Introduces two sets of data:
- More verbose set used to generate the admin page. - More concise set that is copied when clicking the "Copy the site info" button intended mostly for support and developers. Props xkon, azaozz. Fixes #46726. Built from https://develop.svn.wordpress.org/trunk@45156 git-svn-id: http://core.svn.wordpress.org/trunk@44965 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
447b956bb8
commit
8ffebab3e6
File diff suppressed because it is too large
Load Diff
|
@ -67,10 +67,7 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
|
|||
WP_Debug_Data::check_for_updates();
|
||||
|
||||
$info = WP_Debug_Data::debug_data();
|
||||
$english_info = '';
|
||||
if ( 0 !== strpos( get_user_locale(), 'en' ) ) {
|
||||
$english_info = WP_Debug_Data::debug_data( 'en_US' );
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<h2>
|
||||
|
@ -86,15 +83,11 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
|
|||
|
||||
<div class="site-health-copy-buttons">
|
||||
<div class="copy-button-wrapper">
|
||||
<button type="button" class="button button-primary copy-button" data-clipboard-text="<?php echo esc_attr( WP_Debug_Data::format( $info, 'text' ) ); ?>"><?php _e( 'Copy site info to clipboard' ); ?></button>
|
||||
<button type="button" class="button copy-button" data-clipboard-text="<?php echo esc_attr( WP_Debug_Data::format( $info, 'debug' ) ); ?>">
|
||||
<?php _e( 'Copy site info to clipboard' ); ?>
|
||||
</button>
|
||||
<span class="success" aria-hidden="true"><?php _e( 'Copied!' ); ?></span>
|
||||
</div>
|
||||
<?php if ( $english_info ) : ?>
|
||||
<div class="copy-button-wrapper">
|
||||
<button type="button" class="button copy-button" data-clipboard-text="<?php echo esc_attr( WP_Debug_Data::format( $english_info, 'text' ) ); ?>"><?php _e( 'Copy site info to clipboard (English)' ); ?></button>
|
||||
<span class="success" aria-hidden="true"><?php _e( 'Copied!' ); ?></span>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div id="health-check-debug" class="health-check-accordion">
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.2-beta2-45155';
|
||||
$wp_version = '5.2-beta2-45156';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue