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: http://svn.automattic.com/wordpress/trunk@11168 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
westi
2009-05-04 09:12:12 +00:00
parent 6c24a749f3
commit c8c528f18e
5 changed files with 25 additions and 13 deletions
+12
View File
@@ -370,3 +370,15 @@ function wp_menu_unfold() {
exit;
}
}
/**
* Strip close comment and close php tags from file headers used by WP
* See http://core.trac.wordpress.org/ticket/8497
*
* @since 2.8
**/
function _cleanup_header_comment($str) {
return trim(preg_replace("/\s*(?:\*\/|\?>).*/", '', $str));
}