#43465 closed defect (bug) (fixed)
Remove an extra space in the admin body class.
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 5.1 | Priority: | lowest |
Severity: | normal | Version: | |
Component: | Administration | Keywords: | good-first-bug has-patch |
Focuses: | Cc: |
Description
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?
Attachments (4)
Change History (13)
#3
@
7 years ago
Thanks for the patch @jainnidhi
@omerblink welcome to WordPress Trac.
If you're looking for general info, then a good starting point is the Core Contributor Handbook:
https://make.wordpress.org/core/handbook/
There's also the New Contributors Chat in Slack #core
See also:
https://make.wordpress.org/meetings/
https://make.wordpress.org/core/tag/new-contributors/
... or to dive right in then I would suggest adjusting 43465.diff to the Coding standards, i.e. like adding extra space for the function input (see here).
Note that it's still an open question if this ticket should be fixed or not.
Hope it helps.
#5
@
7 years ago
43465.2.diff updates the original patch to add extra space to the function for the coding standards that @birgire had mentioned
#6
@
7 years ago
I've tested the patch 43465.3.diff. It introduces a syntax error and doesn't comply to the WordPress Coding Standards.
I've tested 43465.2.diff locally, it solves the issue and does comply to the WordPress Coding Standards.
@
7 years ago
I've already added the patch 43465.diff for this fix but I've used the coding standards in this patch.
If I want to contribute in this ticket what should I do?
Sorry about the silly question... I'm new in contribution