[wp-trac] [WordPress Trac] #49059: Whitespace inside p element in wp-signup.php should be removed

WordPress Trac noreply at wordpress.org
Sat Dec 21 19:15:02 UTC 2019


#49059: Whitespace inside p element in wp-signup.php should be removed
--------------------------------+------------------------------------------
 Reporter:  henry.wright        |       Owner:  johnjamesjacoby
     Type:  enhancement         |      Status:  assigned
 Priority:  normal              |   Milestone:  5.4
Component:  Networks and Sites  |     Version:  3.0
 Severity:  normal              |  Resolution:
 Keywords:  close               |     Focuses:  multisite, coding-standards
--------------------------------+------------------------------------------

Comment (by azaozz):

 Replying to [comment:10 johnjamesjacoby]:
 > Which standard? šŸ˜

 The use of `echo '<p>' . function(...)`  vs. `?><p><?php` for HTML tags.
 Generally the former is preferred (see the examples)?

 > Define ā€œbetter readability.ā€

 In this case being able to quickly figure out what is HTML and what is
 PHP? Of course that depends on the IDE you're using, code highlighting,
 etc. but generally `echo '<this is HTML>';` is worse? :)

 > Iā€™m recommending we make these changes here without the need to call a
 formal Slack meeting...

 Hehe, that wasn't my intention.

 > Case in point are the number of times tickets like this get opened
 through the years. There is clearly an audience of contributors that does
 not find the current approach to be ā€œbetterā€ nor even correct.

 I've looked at quite a few of these tickets and pretty much all I've seen
 seems to miss the PHP side of things. They usually only talk about
 "prettifying" HTML output but don't consider source code readability.

 OK, which approach is better? Changing this will add more inconsistently
 formatted/concatenated code. Should changes be made to try to make the
 outputted HTML as readable as possible and ignore/diminish readability in
 PHP? I see at least few hundred places that need such changes.

 Or should the practice to patch some places to improve HTML "white space"
 and other places to improve PHP code (adding HTML white space in the
 process) continue? :)

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/49059#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list