<!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>[15646] trunk/wp-admin/themes.php: Options list for current theme.</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/15646">15646</a></dd>
<dt>Author</dt> <dd>ryan</dd>
<dt>Date</dt> <dd>2010-09-22 17:23:38 +0000 (Wed, 22 Sep 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>Options list for current theme. see <a href="http://trac.wordpress.org/ticket/14936">#14936</a></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminthemesphp">trunk/wp-admin/themes.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminthemesphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/themes.php (15645 => 15646)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/themes.php        2010-09-22 17:23:00 UTC (rev 15645)
+++ trunk/wp-admin/themes.php        2010-09-22 17:23:38 UTC (rev 15646)
</span><span class="lines">@@ -81,14 +81,41 @@
</span><span class="cx">         /* translators: 1: theme title, 2: theme version, 3: theme author */
</span><span class="cx">         printf(__('%1$s %2$s by %3$s'), $ct->title, $ct->version, $ct->author) ; ?></h4>
</span><span class="cx"> <p class="theme-description"><?php echo $ct->description; ?></p>
</span><del>-<?php if ( current_user_can('edit_themes') && $ct->parent_theme ) { ?>
-        <p><?php printf(__('The template files are located in <code>%2$s</code>. The stylesheet files are located in <code>%3$s</code>. <strong>%4$s</strong> uses templates from <strong>%5$s</strong>. Changes made to the templates will affect both themes.'), $ct->title, str_replace( WP_CONTENT_DIR, '', $ct->template_dir ), str_replace( WP_CONTENT_DIR, '', $ct->stylesheet_dir ), $ct->title, $ct->parent_theme); ?></p>
-<?php } else { ?>
-        <p><?php printf(__('All of this theme&#8217;s files are located in <code>%2$s</code>.'), $ct->title, str_replace( WP_CONTENT_DIR, '', $ct->template_dir ), str_replace( WP_CONTENT_DIR, '', $ct->stylesheet_dir ) ); ?></p>
-<?php } ?>
-<?php if ( $ct->tags ) : ?>
-<p><?php _e('Tags:'); ?> <?php echo join(', ', $ct->tags); ?></p>
-<?php endif; ?>
</del><ins>+<div class="theme-options">
+        <span><?php _e( 'Options:' )?></span>
+        <?php
+        // Pretend you didn't see this.
+        $options = array();
+        if ( is_array( $submenu ) && isset( $submenu['themes.php'] ) ) {
+                foreach ( (array) $submenu['themes.php'] as $item) {
+                        $class = '';
+                        if ( 'themes.php' == $item[2] || 'theme-editor.php' == $item[2] )
+                                continue;
+                        // 0 = name, 1 = capability, 2 = file
+                        if ( ( strcmp($self, $item[2]) == 0 && empty($parent_file)) || ($parent_file && ($item[2] == $parent_file)) ) $class = ' class="current"';
+
+                        if ( !empty($submenu[$item[2]]) ) {
+                                $submenu[$item[2]] = array_values($submenu[$item[2]]); // Re-index.
+                                $menu_hook = get_plugin_page_hook($submenu[$item[2]][0][2], $item[2]);
+                                if ( file_exists(ABSPATH . PLUGINDIR . "/{$submenu[$item[2]][0][2]}") || !empty($menu_hook))
+                                        $options[] = "<a href='admin.php?page={$submenu[$item[2]][0][2]}'$class>{$item[0]}</a>";
+                                else
+                                        $options[] = "<a href='{$submenu[$item[2]][0][2]}'$class>{$item[0]}</a>";
+                        } else if ( current_user_can($item[1]) ) {
+                                if ( file_exists(ABSPATH . 'wp-admin/' . $item[2]) ) {
+                                        $options[] = "<a href='{$item[2]}'$class>{$item[0]}</a>";
+                                } else {
+                                        $options[] = "<a href='themes.php?page={$item[2]}'$class>{$item[0]}</a>";
+                                }
+                        }
+                }
+        }
+        echo implode ( ' | ', $options );
+        
+        if ( $ct->tags ) : ?>
+        <p><?php _e('Tags:'); ?> <?php echo join(', ', $ct->tags); ?></p>
+        <?php endif; ?>
+</div>
</ins><span class="cx"> <?php theme_update_available($ct); ?>
</span><span class="cx">
</span><span class="cx"> </div>
</span></span></pre>
</div>
</div>
</body>
</html>