Changeset 16715 for trunk/wp-admin/theme-editor.php
- Timestamp:
- 12/04/2010 04:16:23 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/theme-editor.php
r16714 r16715 126 126 127 127 $description = get_file_description($file); 128 $desc_header = ( $description != $file_show ) ? "$description <span>( %s)</span>" : "<span>%s</span>";128 $desc_header = ( $description != $file_show ) ? "$description <span>($file_show)</span>" : $file_show; 129 129 130 130 $is_child_theme = $themes[$theme]['Template'] != $themes[$theme]['Stylesheet']; … … 136 136 <div class="fileedit-sub"> 137 137 <div class="alignleft"> 138 <h3><?php 139 if ( $is_child_theme && strpos( $file, $themes[$theme]['Template Dir'] ) === 0 ) 140 echo $themes[$theme]['Parent Theme'] . ': '; 141 else 142 echo $themes[$theme]['Name'] . ': '; 143 printf( $desc_header, $file_show ); ?></h3> 138 <h3><?php echo $themes[$theme]['Name'] . ': ' . $desc_header; ?></h3> 144 139 </div> 145 140 <div class="alignright"> … … 183 178 $filedesc = ( $description != $template_file ) ? "$description<br /><span class='nonessential'>($template_show)</span>" : "$description"; 184 179 $filedesc = ( $template_file == $file ) ? "<span class='highlight'>$description<br /><span class='nonessential'>($template_show)</span></span>" : $filedesc; 185 186 // If we have two files of the same name prefer the one in the Template Directory 187 // This means that we display the correct files for child themes which overload Templates as well as Styles 188 if ( array_key_exists($description, $template_mapping ) ) { 189 if ( false !== strpos( $template_file, $template_dir ) ) { 190 $template_mapping[ $description ] = array( _get_template_edit_filename($template_file, $template_dir), $filedesc ); 191 } 192 } else { 193 $template_mapping[ $description ] = array( _get_template_edit_filename($template_file, $template_dir), $filedesc ); 194 } 180 $template_mapping[ $description ] = array( _get_template_edit_filename($template_file, $template_dir), $filedesc ); 195 181 } 196 182 ksort( $template_mapping );
Note: See TracChangeset
for help on using the changeset viewer.