[wp-trac] [WordPress Trac] #4165: Page template names include code

WordPress Trac wp-trac at lists.automattic.com
Wed Apr 18 22:02:16 GMT 2007


#4165: Page template names include code
----------------------------+-----------------------------------------------
 Reporter:  kapoylski       |       Owner:  anonymous
     Type:  defect          |      Status:  new      
 Priority:  low             |   Milestone:  2.4      
Component:  Administration  |     Version:  2.1      
 Severity:  normal          |    Keywords:           
----------------------------+-----------------------------------------------
 In the WordPress admin, under Write > Write Page there is a drop-down box
 for selecting the page template. When I create my own page templates and
 add them, the box lists them, but includes extra characters alongside the
 name. If I alter the regular expression used in get_page_templates() in
 the admin_functions.php on line 1247 file from:
 {{{
 preg_match( "|Template Name:(.*)|i", $template_data, $name );
 }}}
 to:
 {{{
 preg_match( "|Template Name:([^\*]*)|i", $template_data, $name );
 }}}
 It no longer includes the characters. I assume the preg_match statement is
 just matching too much and returning it as the template name. I'm
 attaching the two template files that exhibit this problem, as well as a
 screen-shot of what I'm seeing.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/4165>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list