[wp-trac] [WordPress Trac] #20955: get_file_data() is more strict than get_page_templates() was in 3.3
WordPress Trac
wp-trac at lists.automattic.com
Thu Jun 14 14:33:36 UTC 2012
#20955: get_file_data() is more strict than get_page_templates() was in 3.3
--------------------------+------------------------------------------
Reporter: nacin | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.4.1
Component: Themes | Version:
Severity: major | Keywords: needs-patch needs-unit-tests
--------------------------+------------------------------------------
get_page_templates() read in a file's contents and then matched '|Template
Name:(.*)$|mi'. get_file_data() is much more strict about what it will
accept. In particular, this will not work:
`<?php /* Template Name: My Template */ ?>`
I like the idea of using get_file_data(), but I don't know if it will be
tenable to keep using it. We can revert to the same operations in 3.3
inside WP_Theme->get_page_templates() and be much safer.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/20955>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list