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

git-svn-id: https://develop.svn.wordpress.org/trunk@16712 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2010-12-03 22:58:56 +00:00
parent 368926d657
commit b4ff753679

View File

@ -224,8 +224,16 @@ if ($allowed_files) :
<?php } ?> <?php } ?>
<div> <div>
<?php if ( is_child_theme() ) :
if ( strpos( $file, $themes[$theme]['Template Dir'] ) === 0 ) { ?>
<p><?php if ( is_writeable( $file ) ) { ?><strong><?php _e( 'Caution:' ); ?></strong><?php } ?>
<?php printf( __( 'This is a file in your parent theme, &#8220;%s.&#8221;' ), $themes[$theme]['Parent Theme'] ); ?></p>
<?php } else { ?>
<p><?php printf( __( 'This is a file in your child theme, &#8220;%s.&#8221;' ), $themes[$theme]['Name'] ); ?></p>
<?php } ?>
<?php endif; ?>
<?php <?php
if ( is_writeable($file) ) : if ( is_writeable( $file ) ) :
submit_button( __( 'Update File' ), 'primary', 'submit', true, array( 'tabindex' => '2' ) ); submit_button( __( 'Update File' ), 'primary', 'submit', true, array( 'tabindex' => '2' ) );
else : ?> else : ?>
<p><em><?php _e('You need to make this file writable before you can save your changes. See <a href="http://codex.wordpress.org/Changing_File_Permissions">the Codex</a> for more information.'); ?></em></p> <p><em><?php _e('You need to make this file writable before you can save your changes. See <a href="http://codex.wordpress.org/Changing_File_Permissions">the Codex</a> for more information.'); ?></em></p>