Make WordPress Core

Changeset 42974


Ignore:
Timestamp:
04/13/2018 02:02:10 PM (6 years ago)
Author:
ocean90
Message:

Administration: Avoid an extra space in the admin body class.

Props jainnidhi, rhetorical, birgire, mathieuhays.
Fixes #43465.

Location:
trunk/src/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/admin-header.php

    r42827 r42974  
    205205 */
    206206$admin_body_classes = apply_filters( 'admin_body_class', '' );
    207 ?>
    208 <body class="wp-admin wp-core-ui no-js <?php echo $admin_body_classes . ' ' . $admin_body_class; ?>">
     207$admin_body_classes = ltrim( $admin_body_classes . ' ' . $admin_body_class );
     208?>
     209<body class="wp-admin wp-core-ui no-js <?php echo $admin_body_classes; ?>">
    209210<script type="text/javascript">
    210211    document.body.className = document.body.className.replace('no-js','js');
  • trunk/src/wp-admin/includes/template.php

    r42875 r42974  
    17891789/** This filter is documented in wp-admin/admin-header.php */
    17901790$admin_body_classes = apply_filters( 'admin_body_class', '' );
     1791$admin_body_classes = ltrim( $admin_body_classes . ' ' . $admin_body_class );
    17911792?>
    17921793<body
     
    17991800}
    18001801?>
    1801  class="wp-admin wp-core-ui no-js iframe <?php echo $admin_body_classes . ' ' . $admin_body_class; ?>">
     1802 class="wp-admin wp-core-ui no-js iframe <?php echo $admin_body_classes; ?>">
    18021803<script type="text/javascript">
    18031804(function(){
Note: See TracChangeset for help on using the changeset viewer.