[wp-trac] Re: [WordPress Trac] #8236: Child theme template files not showing up in Theme editor

WordPress Trac wp-trac at lists.automattic.com
Tue Nov 18 20:34:57 GMT 2008


#8236: Child theme template files not showing up in Theme editor
-----------------------------------------------+----------------------------
 Reporter:  roganty                            |        Owner:     
     Type:  defect                             |       Status:  new
 Priority:  normal                             |    Milestone:  2.7
Component:  Themes                             |      Version:  2.7
 Severity:  normal                             |   Resolution:     
 Keywords:  child theme, theme editor, themes  |  
-----------------------------------------------+----------------------------
Comment (by roganty):

 Ok, I think I have found where the problem is occurring

 It is in the file /wp-admin/theme-editor.php[[BR]]
 {{{
         $template_mapping = array();
         foreach($themes[$theme]['Template Files'] as $template_file) {
                 $description = trim( get_file_description($template_file)
 );
                 $template_show = basename($template_file);
                 $filedesc = ( $description != $template_file ) ?
 "$description <span class='nonessential'>($template_show)</span>" :
 "$description";
                 $filedesc = ( $template_file == $file ) ? "<span
 class='highlight'>$description <span
 class='nonessential'>($template_show)</span></span>" : $filedesc;
                 $template_mapping[ $description ] = array( $template_file,
 $filedesc );
         }
         ksort( $template_mapping );

 }}}

 What is needed is to check if the file has already been added.

 I'll have a go and see if I can come up with something.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/8236#comment:2>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list