[wp-trac] [WordPress Trac] #33388: WP_Theme should use get_file_data() for retrieving page templates
WordPress Trac
noreply at wordpress.org
Mon Aug 17 08:40:07 UTC 2015
#33388: WP_Theme should use get_file_data() for retrieving page templates
--------------------------+-----------------------------
Reporter: dd32 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Themes | Version:
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
Currently WP_Theme::get_page_templates() uses a direct regular expression
on the result of `get_file_contents()`, it should instead use the
`get_file_data()` helper method we have to interact with file header data.
Currently switching will result in a back-compat break, as some themes
have been using headers such as `<?php // Template Name: Something ?>` as
the header, which get_file_data() doesn't like - See #33387
See r21117 for where we previously did use it temporarily during the 3.4
cycle, but broke due to #33387
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33388>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list