mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-22 14:35:07 +00:00
Sanity text in the theme editor when you have a child theme. fixes #15672.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
72958d1c53
commit
67f2b68ed6
@ -224,8 +224,16 @@ if ($allowed_files) :
|
||||
<?php } ?>
|
||||
|
||||
<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, “%s.”' ), $themes[$theme]['Parent Theme'] ); ?></p>
|
||||
<?php } else { ?>
|
||||
<p><?php printf( __( 'This is a file in your child theme, “%s.”' ), $themes[$theme]['Name'] ); ?></p>
|
||||
<?php } ?>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
if ( is_writeable($file) ) :
|
||||
if ( is_writeable( $file ) ) :
|
||||
submit_button( __( 'Update File' ), 'primary', 'submit', true, array( 'tabindex' => '2' ) );
|
||||
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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user