Changeset 6878 for trunk/wp-admin/theme-editor.php
- Timestamp:
- 02/16/2008 10:08:13 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/theme-editor.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/theme-editor.php
r6772 r6878 6 6 7 7 wp_reset_vars(array('action', 'redirect', 'profile', 'error', 'warning', 'a', 'file', 'theme')); 8 wp_admin_css( 'css/theme-editor' ); 8 9 9 10 $themes = get_themes(); … … 79 80 <?php if (isset($_GET['a'])) : ?> 80 81 <div id="message" class="updated fade"><p><?php _e('File edited successfully.') ?></p></div> 81 <?php endif; ?> 82 <div class="wrap"> 83 <form name="theme" action="theme-editor.php" method="post"> 84 <?php _e('Select theme to edit:') ?> 85 <select name="theme" id="theme"> 86 <?php 87 foreach ($themes as $a_theme) { 88 $theme_name = $a_theme['Name']; 89 if ($theme_name == $theme) $selected = " selected='selected'"; 90 else $selected = ''; 91 $theme_name = attribute_escape($theme_name); 92 echo "\n\t<option value=\"$theme_name\" $selected>$theme_name</option>"; 93 } 82 <?php endif; 83 84 $description = get_file_description($file); 85 $desc_header = ( $description != $file_show ) ? "$description</strong> (%s)" : "%s"; 94 86 ?> 95 </select> 96 <input type="submit" name="Submit" value="<?php _e('Select »') ?>" class="button" /> 97 </form> 98 </div> 99 100 <div class="wrap"> 101 <?php 102 if ( is_writeable($real_file) ) { 103 echo '<h2>' . sprintf(__('Editing <code>%s</code>'), $file_show) . '</h2>'; 104 } else { 105 echo '<h2>' . sprintf(__('Browsing <code>%s</code>'), $file_show) . '</h2>'; 106 } 107 ?> 87 <div class="wrap"> 88 <div class="bordertitle"> 89 <h2 style="border: none; padding-bottom: 0px;">Theme Editor</h2> 90 <form id="themeselector" name="theme" action="theme-editor.php" method="post"> 91 <strong><?php _e('Select theme to edit: '); ?></strong> 92 <select name="theme" id="theme" style="margin: 0; padding: 0;"> 93 <?php 94 foreach ($themes as $a_theme) { 95 $theme_name = $a_theme['Name']; 96 if ($theme_name == $theme) $selected = " selected='selected'"; 97 else $selected = ''; 98 $theme_name = attribute_escape($theme_name); 99 echo "\n\t<option value=\"$theme_name\" $selected>$theme_name</option>"; 100 } 101 ?> 102 </select> 103 <input type="submit" name="Submit" value="<?php _e('Select') ?>" class="button" style="padding: 0px;" /> 104 </form> 105 </div> 106 <br style="clear: both;" /> 107 <div class="tablenav" style="margin-right: 210px;"> 108 <div style="float: left;"> 109 <big><strong><?php echo sprintf($desc_header, $file_show); ?></big> 110 </div> 111 <br style="clear: both;" /> 112 </div> 113 <br style="clear: both;" /> 108 114 <div id="templateside"> 109 <h3 ><?php printf(__("<strong>'%s'</strong> theme files"), $theme)?></h3>115 <h3 id="bordertitle" style="margin-bottom: 10px;"><?php _e("Theme Files"); ?></h3> 110 116 111 117 <?php 112 118 if ($allowed_files) : 113 119 ?> 120 <h4 style="margin-bottom: 0px;"><?php _e('Templates'); ?></h4> 114 121 <ul> 115 <?php foreach($allowed_files as $allowed_file) : ?> 116 <li><a href="theme-editor.php?file=<?php echo "$allowed_file"; ?>&theme=<?php echo urlencode($theme) ?>"><?php echo get_file_description($allowed_file); ?></a></li> 122 <?php foreach($themes[$theme]['Template Files'] as $template_file) : 123 $description = get_file_description($template_file); 124 $template_show = basename($template_file); 125 $filedesc = ( $description != $template_file ) ? "$description <span class='nonessential'>($template_show)</span></small>" : "$description"; 126 $filedesc = ( $template_file == $file ) ? "<span class='highlight'>$description <span class='nonessential'>($template_show)</span></span>" : $filedesc; 127 ?> 128 <li><a href="theme-editor.php?file=<?php echo "$template_file"; ?>&theme=<?php echo urlencode($theme) ?>"><?php echo $filedesc ?></a></li> 129 <?php endforeach; ?> 130 </ul> 131 <h4 style="margin-bottom: 0px;"><?php _e('Styles'); ?></h4> 132 <ul> 133 <?php foreach($themes[$theme]['Stylesheet Files'] as $style_file) : 134 $description = get_file_description($style_file); 135 $style_show = basename($style_file); 136 $filedesc = ( $description != $style_file ) ? "$description <span class='nonessential'>($style_show)</span>" : "$description"; 137 $filedesc = ( $style_file == $file ) ? "<span class='highlight'>$description <span class='nonessential'>($style_show)</span></span>" : $filedesc; 138 ?> 139 <li><a href="theme-editor.php?file=<?php echo "$style_file"; ?>&theme=<?php echo urlencode($theme) ?>"><?php echo $filedesc ?></a></li> 117 140 <?php endforeach; ?> 118 141 </ul>
Note: See TracChangeset
for help on using the changeset viewer.