[wp-trac] [WordPress Trac] #48515: [Theme compatibility] Changes to WP_Theme to add correct header data

WordPress Trac noreply at wordpress.org
Wed Nov 6 18:48:24 UTC 2019


#48515: [Theme compatibility] Changes to WP_Theme to add correct header data
------------------------------------------+------------------------------
 Reporter:  afragen                       |       Owner:  (none)
     Type:  enhancement                   |      Status:  new
 Priority:  normal                        |   Milestone:  Awaiting Review
Component:  Themes                        |     Version:
 Severity:  normal                        |  Resolution:
 Keywords:  has-patch dev-feedback early  |     Focuses:  administration
------------------------------------------+------------------------------

Comment (by Otto42):

 When they added the requires header for this, they put it in the wrong
 file.

 Historically, WordPress code code only parsed the plugin's main PHP file
 for header information. The readme.txt was, and still is, completely
 optional for plugins. It's been used only by the plugin directory itself,
 for information that is shown on WordPress.org or passed to WordPress as
 part of the API request when installing new plugins.

 They put it in the readme.txt because they thought that this was required
 for it to be in the API response. However, this was not the case, the
 plugin directory gets information from both sources and always has. Since
 the intent was to eventually have core need this information from locally
 installed plugins as well, then the information should have been in the
 plugin's main PHP file from the start.

 This not being the case, core was altered at one point to read and parse
 the readme.txt, which again, is supposed to be a completely optional file.

 This is the fundamental error. Core should *not* parse the readme.txt
 file. The addition of this header to the readme.txt was a mistake, and
 further mistakes have been made compounding that error.

 Now you're making the same mistakes and compounding it further with the
 themes. This needs to be corrected before it spreads any further.

 - The header should be in style.css or in the plugin's main PHP file only.
 It should not be in readme.txt at all.
 - The core should not parse the readme.txt. Code doing so should be
 removed in the long term. No new code should be added.
 - The readme.txt should remain optional for both plugins and themes, and
 should only contain information to be used by the WordPress.org system
 itself, and not information that core should read locally.

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


More information about the wp-trac mailing list