Administration: Reduce the chance that a PHP error message that occurs before the admin menu gets output is covered by the admin menu.

Props EmpireOfLight, afercia, Mte90, audrasjb, sunnyratilal

Fixes #35155
Built from https://develop.svn.wordpress.org/trunk@47745


git-svn-id: http://core.svn.wordpress.org/trunk@47521 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
John Blackbourn 2020-05-02 21:01:05 +00:00
parent 55117c5376
commit 5641afd43b
6 changed files with 26 additions and 3 deletions

View File

@ -200,6 +200,11 @@ if ( $current_screen->is_block_editor() ) {
} }
} }
// Print a CSS class to make PHP errors visible.
if ( error_get_last() && WP_DEBUG && WP_DEBUG_DISPLAY && ini_get( 'display_errors' ) ) {
$admin_body_class .= ' php-error';
}
?> ?>
</head> </head>
<?php <?php

View File

@ -14,6 +14,15 @@
z-index: 1; /* positive z-index to avoid elastic scrolling woes in Safari */ z-index: 1; /* positive z-index to avoid elastic scrolling woes in Safari */
} }
.php-error #adminmenuback {
position: absolute;
}
.php-error #adminmenuback,
.php-error #adminmenuwrap {
margin-top: 2em;
}
#adminmenu { #adminmenu {
clear: right; clear: right;
margin: 12px 0; margin: 12px 0;

File diff suppressed because one or more lines are too long

View File

@ -13,6 +13,15 @@
z-index: 1; /* positive z-index to avoid elastic scrolling woes in Safari */ z-index: 1; /* positive z-index to avoid elastic scrolling woes in Safari */
} }
.php-error #adminmenuback {
position: absolute;
}
.php-error #adminmenuback,
.php-error #adminmenuwrap {
margin-top: 2em;
}
#adminmenu { #adminmenu {
clear: left; clear: left;
margin: 12px 0; margin: 12px 0;

File diff suppressed because one or more lines are too long

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.5-alpha-47744'; $wp_version = '5.5-alpha-47745';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.