<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[16714] trunk: Don'
t even show parent theme files when viewing the child theme.</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/16714">16714</a></dd>
<dt>Author</dt> <dd>nacin</dd>
<dt>Date</dt> <dd>2010-12-04 03:52:59 +0000 (Sat, 04 Dec 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>Don't even show parent theme files when viewing the child theme. see <a href="http://trac.wordpress.org/ticket/15672">#15672</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadmincssthemeeditorcss">trunk/wp-admin/css/theme-editor.css</a></li>
<li><a href="#trunkwpadmincssthemeeditordevcss">trunk/wp-admin/css/theme-editor.dev.css</a></li>
<li><a href="#trunkwpadminthemeeditorphp">trunk/wp-admin/theme-editor.php</a></li>
<li><a href="#trunkwpincludesscriptloaderphp">trunk/wp-includes/script-loader.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadmincssthemeeditorcss"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/css/theme-editor.css (16713 => 16714)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/css/theme-editor.css        2010-12-03 23:18:02 UTC (rev 16713)
+++ trunk/wp-admin/css/theme-editor.css        2010-12-04 03:52:59 UTC (rev 16714)
</span><span class="lines">@@ -1 +1 @@
</span><del>-#template textarea{font-family:Consolas,Monaco,Courier,monospace;font-size:12px;width:97%;}#template p{width:97%;}#templateside{float:right;width:190px;word-wrap:break-word;}#templateside h3,#postcustomstuff p.submit{margin:0;}#templateside h4{margin:1em 0 0;}#templateside ol,#templateside ul{margin:.5em;padding:0;}#templateside li{margin:4px 0;}#templateside ul li a span.highlight{display:block;}.nonessential{font-size:11px;font-style:italic;padding-left:12px;}.highlight{padding:3px 3px 3px 12px;margin-left:-12px;font-weight:bold;-moz-border-radius:8px;-khtml-border-radius:8px;-webkit-border-radius:8px;border-radius:8px;}div.tablenav{margin-right:210px;}#documentation{margin-top:10px;}#documentation label{line-height:22px;vertical-align:top;font-weight:bold;}.fileedit-sub{padding:10px 0 8px;line-height:180%;}
</del><span class="cx">\ No newline at end of file
</span><ins>+h3 span{font-weight:normal;}#template textarea{font-family:Consolas,Monaco,Courier,monospace;font-size:12px;width:97%;}#template p{width:97%;}#templateside{float:right;width:190px;word-wrap:break-word;}#templateside h3,#postcustomstuff p.submit{margin:0;}#templateside h4{margin:1em 0 0;}#templateside ol,#templateside ul{margin:.5em;padding:0;}#templateside li{margin:4px 0;}#templateside ul li a span.highlight{display:block;}.nonessential{font-size:11px;font-style:italic;padding-left:12px;}.highlight{padding:3px 3px 3px 12px;margin-left:-12px;font-weight:bold;-moz-border-radius:8px;-khtml-border-radius:8px;-webkit-border-radius:8px;border-radius:8px;}div.tablenav{margin-right:210px;}#documentation{margin-top:10px;}#documentation label{line-height:22px;vertical-align:top;font-weight:bold;}.fileedit-sub{padding:10px 0 8px;line-height:180%;}
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpadmincssthemeeditordevcss"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/css/theme-editor.dev.css (16713 => 16714)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/css/theme-editor.dev.css        2010-12-03 23:18:02 UTC (rev 16713)
+++ trunk/wp-admin/css/theme-editor.dev.css        2010-12-04 03:52:59 UTC (rev 16714)
</span><span class="lines">@@ -1,3 +1,7 @@
</span><ins>+h3 span {
+        font-weight: normal;
+}
+
</ins><span class="cx"> #template textarea {
</span><span class="cx">         font-family: Consolas, Monaco, Courier, monospace;
</span><span class="cx">         font-size: 12px;
</span></span></pre></div>
<a id="trunkwpadminthemeeditorphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/theme-editor.php (16713 => 16714)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/theme-editor.php        2010-12-03 23:18:02 UTC (rev 16713)
+++ trunk/wp-admin/theme-editor.php        2010-12-04 03:52:59 UTC (rev 16714)
</span><span class="lines">@@ -125,7 +125,9 @@
</span><span class="cx"> <?php endif;
</span><span class="cx">
</span><span class="cx"> $description = get_file_description($file);
</span><del>-$desc_header = ( $description != $file_show ) ? "<strong>$description</strong> (%s)" : "%s";
</del><ins>+$desc_header = ( $description != $file_show ) ? "$description <span>(%s)</span>" : "<span>%s</span>";
+
+$is_child_theme = $themes[$theme]['Template'] != $themes[$theme]['Stylesheet'];
</ins><span class="cx"> ?>
</span><span class="cx"> <div class="wrap">
</span><span class="cx"> <?php screen_icon(); ?>
</span><span class="lines">@@ -133,7 +135,12 @@
</span><span class="cx">
</span><span class="cx"> <div class="fileedit-sub">
</span><span class="cx"> <div class="alignleft">
</span><del>-<big><?php echo sprintf($desc_header, $file_show); ?></big>
</del><ins>+<h3><?php
+if ( $is_child_theme && strpos( $file, $themes[$theme]['Template Dir'] ) === 0 )
+        echo $themes[$theme]['Parent Theme'] . ': ';
+else
+        echo $themes[$theme]['Name'] . ': ';
+printf( $desc_header, $file_show ); ?></h3>
</ins><span class="cx"> </div>
</span><span class="cx"> <div class="alignright">
</span><span class="cx">         <form action="theme-editor.php" method="post">
</span><span class="lines">@@ -155,16 +162,22 @@
</span><span class="cx"> <br class="clear" />
</span><span class="cx"> </div>
</span><span class="cx">         <div id="templateside">
</span><del>-
</del><span class="cx"> <?php
</span><span class="cx"> if ($allowed_files) :
</span><span class="cx"> ?>
</span><span class="cx">         <h3><?php _e('Templates'); ?></h3>
</span><ins>+        <?php if ( $is_child_theme ) : ?>
+        <p class="howto"><?php printf( __( 'This child theme inherits templates from a parent theme, %s.' ), $themes[$theme]['Parent Theme'] ); ?></p>
+        <?php endif; ?>
</ins><span class="cx">         <ul>
</span><span class="cx"> <?php
</span><span class="cx">         $template_mapping = array();
</span><span class="cx">         $template_dir = $themes[$theme]['Template Dir'];
</span><span class="cx">         foreach ( $themes[$theme]['Template Files'] as $template_file ) {
</span><ins>+                // Don't show parent templates.
+                if ( $is_child_theme && strpos( $template_file, $themes[$theme]['Template Dir'] ) === 0 )
+                        continue;
+
</ins><span class="cx">                 $description = trim( get_file_description($template_file) );
</span><span class="cx">                 $template_show = basename($template_file);
</span><span class="cx">                 $filedesc = ( $description != $template_file ) ? "$description<br /><span class='nonessential'>($template_show)</span>" : "$description";
</span><span class="lines">@@ -192,6 +205,10 @@
</span><span class="cx">         $template_mapping = array();
</span><span class="cx">         $stylesheet_dir = $themes[$theme]['Stylesheet Dir'];
</span><span class="cx">         foreach ( $themes[$theme]['Stylesheet Files'] as $style_file ) {
</span><ins>+                // Don't show parent styles.
+                if ( $is_child_theme && strpos( $style_file, $themes[$theme]['Template Dir'] ) === 0 )
+                        continue;
+
</ins><span class="cx">                 $description = trim( get_file_description($style_file) );
</span><span class="cx">                 $style_show = basename($style_file);
</span><span class="cx">                 $filedesc = ( $description != $style_file ) ? "$description<br /><span class='nonessential'>($style_show)</span>" : "$description";
</span><span class="lines">@@ -224,13 +241,9 @@
</span><span class="cx">         <?php } ?>
</span><span class="cx">
</span><span class="cx">                 <div>
</span><del>-                <?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 } ?>
</del><ins>+                <?php if ( is_child_theme() && ! $is_child_theme && $themes[$theme]['Template'] == get_option('template') ) : ?>
+                        <p><?php if ( is_writeable( $file ) ) { ?><strong><?php _e( 'Caution:' ); ?></strong><?php } ?>
+                        <?php _e( 'This is a file in your current parent theme.' ); ?></p>
</ins><span class="cx">                 <?php endif; ?>
</span><span class="cx"> <?php
</span><span class="cx">         if ( is_writeable( $file ) ) :
</span></span></pre></div>
<a id="trunkwpincludesscriptloaderphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/script-loader.php (16713 => 16714)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/script-loader.php        2010-12-03 23:18:02 UTC (rev 16713)
+++ trunk/wp-includes/script-loader.php        2010-12-04 03:52:59 UTC (rev 16714)
</span><span class="lines">@@ -506,7 +506,7 @@
</span><span class="cx">         $styles->add( 'widgets', "/wp-admin/css/widgets$suffix.css", array(), '20100610' );
</span><span class="cx">         $styles->add( 'dashboard', "/wp-admin/css/dashboard$suffix.css", array(), '20101020' );
</span><span class="cx">         $styles->add( 'install', "/wp-admin/css/install$suffix.css", array(), '20101020' ); // Readme as well
</span><del>-        $styles->add( 'theme-editor', "/wp-admin/css/theme-editor$suffix.css", array(), '20100514' );
</del><ins>+        $styles->add( 'theme-editor', "/wp-admin/css/theme-editor$suffix.css", array(), '20101203' );
</ins><span class="cx">         $styles->add( 'press-this', "/wp-admin/css/press-this$suffix.css", array(), '20101020' );
</span><span class="cx">         $styles->add( 'thickbox', '/wp-includes/js/thickbox/thickbox.css', array(), '20090514' );
</span><span class="cx">         $styles->add( 'login', "/wp-admin/css/login$suffix.css", array(), '20101020' );
</span></span></pre>
</div>
</div>
</body>
</html>