WordPress.org

Make WordPress Core


Ignore:
Timestamp:
12/03/10 22:58:56 (4 years ago)
Author:
nacin
Message:

Sanity text in the theme editor when you have a child theme. fixes #15672.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/theme-editor.php

    r16431 r16712  
    225225 
    226226        <div> 
    227 <?php 
    228     if ( is_writeable($file) ) : 
     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, &#8220;%s.&#8221;' ), $themes[$theme]['Parent Theme'] ); ?></p> 
     231            <?php } else { ?> 
     232                <p><?php printf( __( 'This is a file in your child theme, &#8220;%s.&#8221;' ), $themes[$theme]['Name'] ); ?></p> 
     233            <?php } ?> 
     234        <?php endif; ?> 
     235<?php 
     236    if ( is_writeable( $file ) ) : 
    229237        submit_button( __( 'Update File' ), 'primary', 'submit', true, array( 'tabindex' => '2' ) ); 
    230238    else : ?> 
Note: See TracChangeset for help on using the changeset viewer.