Support single line Template Name comment blocks for theme Templates and apply same cleanup to all header lines. Fixes #8497 props DD32 and Denis-de-Bernardy.

git-svn-id: https://develop.svn.wordpress.org/trunk@11168 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Westwood
2009-05-04 09:12:12 +00:00
parent c48c21b845
commit 5db0851318
5 changed files with 25 additions and 13 deletions
+1 -1
View File
@@ -133,7 +133,7 @@ function get_page_templates() {
$name = '';
if ( preg_match( '|Template Name:(.*)$|mi', $template_data, $name ) )
$name = $name[1];
$name = _cleanup_header_comment($name[1]);
if ( !empty( $name ) ) {
$page_templates[trim( $name )] = basename( $template );