[wp-trac] [WordPress Trac] #43465: Remove an extra space in the admin body class.
WordPress Trac
noreply at wordpress.org
Sun Mar 4 08:00:42 UTC 2018
#43465: Remove an extra space in the admin body class.
----------------------------+-----------------------------
Reporter: birgire | Owner:
Type: defect (bug) | Status: new
Priority: lowest | Milestone: Awaiting Review
Component: Administration | Version:
Severity: normal | Keywords: good-first-bug
Focuses: |
----------------------------+-----------------------------
I just noticed that there's an extra space in the admin body class.
Here's an example on {{{wp-admin/index.php}}}:
{{{
<body class="wp-admin wp-core-ui no-js index-php ...">
}}}
This is generated in {{{wp-admin/admin-header.php}}} with:
{{{
<body class="wp-admin wp-core-ui no-js <?php echo $admin_body_classes . '
' . $admin_body_class ?>">
}}}
There's no harm in extra spaces between classes, but it could be fix it
with a {{{ltrim()}}} or {{{trim()}}} to cover both ends.
Example:
{{{
<body class="wp-admin wp-core-ui no-js <?php echo trim(
$admin_body_classes . ' ' . $admin_body_class ); ?>">
}}}
Maybe there are other ways or we could just leave it as is?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43465>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list