Changeset 16714 for trunk/wp-admin/theme-editor.php
- Timestamp:
- 12/04/2010 03:52:59 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/theme-editor.php
r16712 r16714 126 126 127 127 $description = get_file_description($file); 128 $desc_header = ( $description != $file_show ) ? "<strong>$description</strong> (%s)" : "%s"; 128 $desc_header = ( $description != $file_show ) ? "$description <span>(%s)</span>" : "<span>%s</span>"; 129 130 $is_child_theme = $themes[$theme]['Template'] != $themes[$theme]['Stylesheet']; 129 131 ?> 130 132 <div class="wrap"> … … 134 136 <div class="fileedit-sub"> 135 137 <div class="alignleft"> 136 <big><?php echo sprintf($desc_header, $file_show); ?></big> 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> 137 144 </div> 138 145 <div class="alignright"> … … 156 163 </div> 157 164 <div id="templateside"> 158 159 165 <?php 160 166 if ($allowed_files) : 161 167 ?> 162 168 <h3><?php _e('Templates'); ?></h3> 169 <?php if ( $is_child_theme ) : ?> 170 <p class="howto"><?php printf( __( 'This child theme inherits templates from a parent theme, %s.' ), $themes[$theme]['Parent Theme'] ); ?></p> 171 <?php endif; ?> 163 172 <ul> 164 173 <?php … … 166 175 $template_dir = $themes[$theme]['Template Dir']; 167 176 foreach ( $themes[$theme]['Template Files'] as $template_file ) { 177 // Don't show parent templates. 178 if ( $is_child_theme && strpos( $template_file, $themes[$theme]['Template Dir'] ) === 0 ) 179 continue; 180 168 181 $description = trim( get_file_description($template_file) ); 169 182 $template_show = basename($template_file); … … 193 206 $stylesheet_dir = $themes[$theme]['Stylesheet Dir']; 194 207 foreach ( $themes[$theme]['Stylesheet Files'] as $style_file ) { 208 // Don't show parent styles. 209 if ( $is_child_theme && strpos( $style_file, $themes[$theme]['Template Dir'] ) === 0 ) 210 continue; 211 195 212 $description = trim( get_file_description($style_file) ); 196 213 $style_show = basename($style_file); … … 225 242 226 243 <div> 227 <?php if ( is_child_theme() ) : 228 if ( strpos( $file, $themes[$theme]['Template Dir'] ) === 0 ) { ?> 229 <p><?php if ( is_writeable( $file ) ) { ?><strong><?php _e( 'Caution:' ); ?></strong><?php } ?> 230 <?php printf( __( 'This is a file in your parent theme, “%s.”' ), $themes[$theme]['Parent Theme'] ); ?></p> 231 <?php } else { ?> 232 <p><?php printf( __( 'This is a file in your child theme, “%s.”' ), $themes[$theme]['Name'] ); ?></p> 233 <?php } ?> 244 <?php if ( is_child_theme() && ! $is_child_theme && $themes[$theme]['Template'] == get_option('template') ) : ?> 245 <p><?php if ( is_writeable( $file ) ) { ?><strong><?php _e( 'Caution:' ); ?></strong><?php } ?> 246 <?php _e( 'This is a file in your current parent theme.' ); ?></p> 234 247 <?php endif; ?> 235 248 <?php
Note: See TracChangeset
for help on using the changeset viewer.