[wp-trac] [WordPress Trac] #55882: Regarding avoid PHP start end tag

WordPress Trac noreply at wordpress.org
Tue May 31 14:00:09 UTC 2022


#55882: Regarding avoid PHP start end tag
---------------------------+-------------------------------
 Reporter:  bhavinp311     |       Owner:  (none)
     Type:  enhancement    |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Bundled Theme  |     Version:
 Severity:  normal         |  Resolution:
 Keywords:  close          |     Focuses:  coding-standards
---------------------------+-------------------------------
Changes (by SergeyBiryukov):

 * keywords:   => close


Comment:

 Hi there, welcome to WordPress Trac! Thanks for the ticket.

 That troubleshooting section only applies to user-editable files that are
 loaded **before** any HTTP headers are sent and any output is displayed on
 the screen, e.g. `wp-config.php` or the theme's `functions.php` file
 (outside of a function).

 The section does not apply to theme templates, which are loaded **after**
 the HTTP headers are sent, so there is nothing wrong with code like that
 in the bundled themes.

 If anyone has ideas on clarifying this in the documentation, please feel
 free to suggest. Thanks!

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


More information about the wp-trac mailing list