Make WordPress Core

Opened 3 years ago

Closed 2 months ago

#43534 closed defect (bug) (maybelater)

Wonky element attributes after coding standards cleanup

Reported by: johnbillion Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.1
Component: Administration Keywords: has-patch needs-refresh
Focuses: coding-standards Cc:


After [42343], the language attributes of the <html> tags in the admin area have gotten too much indentation and too many line breaks.

See _wp_admin_html_begin().

Attachments (3)

Screen Shot 2018-03-12 at 20.47.19.png (71.3 KB) - added by johnbillion 3 years ago.
43534.diff (1.6 KB) - added by chetan200891 3 years ago.
Created patch to fix indentation and line breaks.
43534.2.diff (1.3 KB) - added by pento 23 months ago.

Download all attachments as: .zip

Change History (15)

3 years ago

Created patch to fix indentation and line breaks.

#1 @chetan200891
3 years ago

  • Keywords has-patch added; needs-patch removed

Created patch 43534.diff to fix unnecessary indentation and line breaks.

#2 @jrf
3 years ago

@chetan200891 Thanks for the patch. Unfortunately the patch does not comply with the coding standards. Would you like me to have a closer look at how to fix this in an alternative way ?

#6 @johnbillion
3 years ago

  • Summary changed from Wonky language attributes after coding standards cleanup to Wonky element attributes after coding standards cleanup

This ticket was mentioned in Slack in #core by afercia. View the logs.

3 years ago

#8 @pento
2 years ago

  • Milestone changed from 5.0 to 5.1

#9 @afercia
23 months ago

For meta-boxes.php see #43259.

23 months ago

#10 @pento
23 months ago

43534.2.diff fixes the first example in a coding standards compliant way.

Most modern editors will recognise HTML being used as the heredoc delimiter, and continue to syntax highlight the block of HTML correctly, though the two I tested (VSCode and Sublime Text) get a little confused over the <html> tag not being closed within the same heredoc.

#11 @peterwilsoncc
23 months ago

  • Milestone changed from 5.1 to Future Release

It's late in the release cycle and browsers treat line breaks within HTML tags the same as spaces. It's wonky but won't be problematic.

Please continue to add further examples to this ticket.

#12 @johnbillion
2 months ago

  • Milestone Future Release deleted
  • Resolution set to maybelater
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.