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

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

git-svn-id: https://develop.svn.wordpress.org/trunk@42974 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling (ocean90) 2018-04-13 14:02:10 +00:00
parent b57b486d96
commit 9f9facad50
2 changed files with 4 additions and 2 deletions

View File

@ -204,8 +204,9 @@ $admin_body_class .= ' no-customize-support no-svg';
* @param string $classes Space-separated list of CSS classes.
*/
$admin_body_classes = apply_filters( 'admin_body_class', '' );
$admin_body_classes = ltrim( $admin_body_classes . ' ' . $admin_body_class );
?>
<body class="wp-admin wp-core-ui no-js <?php echo $admin_body_classes . ' ' . $admin_body_class; ?>">
<body class="wp-admin wp-core-ui no-js <?php echo $admin_body_classes; ?>">
<script type="text/javascript">
document.body.className = document.body.className.replace('no-js','js');
</script>

View File

@ -1788,6 +1788,7 @@ if ( is_rtl() ) {
<?php
/** This filter is documented in wp-admin/admin-header.php */
$admin_body_classes = apply_filters( 'admin_body_class', '' );
$admin_body_classes = ltrim( $admin_body_classes . ' ' . $admin_body_class );
?>
<body
<?php
@ -1798,7 +1799,7 @@ if ( isset( $GLOBALS['body_id'] ) ) {
echo ' id="' . $GLOBALS['body_id'] . '"';
}
?>
class="wp-admin wp-core-ui no-js iframe <?php echo $admin_body_classes . ' ' . $admin_body_class; ?>">
class="wp-admin wp-core-ui no-js iframe <?php echo $admin_body_classes; ?>">
<script type="text/javascript">
(function(){
var c = document.body.className;