Make WordPress Core

Ticket #35155: 35155.1.diff

File 35155.1.diff, 874 bytes (added by audrasjb, 4 years ago)

Administration: Print a CSS class to make PHP errors visible in WP-Admin

  • src/wp-admin/admin-header.php

    diff --git a/src/wp-admin/admin-header.php b/src/wp-admin/admin-header.php
    index c6760f9b86..e303b77f9b 100644
    a b if ( $current_screen->is_block_editor() ) { 
    200200        }
    201201}
    202202
     203// Print a CSS class to make PHP errors visible.
     204if ( error_get_last() ) {
     205        $admin_body_class .= ' php-error';
     206}
     207
    203208?>
    204209</head>
    205210<?php
  • src/wp-admin/css/admin-menu.css

    diff --git a/src/wp-admin/css/admin-menu.css b/src/wp-admin/css/admin-menu.css
    index a3d8f4f262..bcecf91a60 100644
    a b  
    1313        z-index: 1; /* positive z-index to avoid elastic scrolling woes in Safari */
    1414}
    1515
     16.php-error #adminmenuback {
     17        position: absolute;
     18}
     19
     20.php-error #adminmenuback,
     21.php-error #adminmenuwrap {
     22        margin-top: 2em;
     23}
     24
    1625#adminmenu {
    1726        clear: left;
    1827        margin: 12px 0;