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 git-svn-id: https://develop.svn.wordpress.org/trunk@47745 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
d250cbcfee
commit
8eab1eb9a9
@ -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>
|
||||
<?php
|
||||
|
@ -13,6 +13,15 @@
|
||||
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 {
|
||||
clear: left;
|
||||
margin: 12px 0;
|
||||
|
Loading…
Reference in New Issue
Block a user