[wp-trac] [WordPress Trac] #33388: WP_Theme should use get_file_data() for retrieving page templates

WordPress Trac noreply at wordpress.org
Thu Aug 14 08:35:42 UTC 2025


#33388: WP_Theme should use get_file_data() for retrieving page templates
-------------------------------------------------+-------------------------
 Reporter:  dd32                                 |       Owner:
                                                 |  SergeyBiryukov
     Type:  defect (bug)                         |      Status:  closed
 Priority:  normal                               |   Milestone:  Future
                                                 |  Release
Component:  Themes                               |     Version:
 Severity:  normal                               |  Resolution:  invalid
 Keywords:  needs-testing has-patch needs-       |     Focuses:
  refresh needs-unit-tests                       |
-------------------------------------------------+-------------------------
Changes (by mosescursor):

 * keywords:  needs-testing has-patch needs-refresh => needs-testing has-
     patch needs-refresh needs-unit-tests
 * status:  reviewing => closed
 * resolution:   => invalid


Comment:

 == Test Report
 === Description
 This report validates whether the indicated patch works as expected.

 Patch tested:
 33888.4.diff​ (1.3 KB) - added by mosescursor 8 minutes ago.
 Patch fixes the incorrect variable check when reading the "Template Post
 Type" header in theme files. Changed from $header to $type so declared
 post types are correctly applied.

 === Environment
 - WordPress: 6.9-alpha-60093-src
 - PHP: 8.2.29
 - Server: nginx/1.29.0
 - Database: mysqli (Server: 8.4.6 / Client: mysqlnd 8.2.29)
 - Browser: Chrome 138.0.0.0
 - OS: macOS
 - Theme: Standard Template Theme 1.0, Legacy Template Theme 1.0
 - MU Plugins: None activated
 - Plugins:
   * Test Reports 1.2.0

 === Actual Results
 1.  ✅ Issue resolved with patch.

 === Additional Notes
 After applying the patch, the template appears for the specified post
 types as expected.

 === Supplemental Artifacts

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


More information about the wp-trac mailing list