Changeset 1089 for trunk/wp-admin/templates.php
- Timestamp:
- 04/17/2004 06:44:10 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/templates.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/templates.php
r1028 r1089 58 58 require_once("admin-header.php"); 59 59 60 if ($user_level < 3) {60 if ($user_level < 5) { 61 61 die('<p>You have do not have sufficient permissions to edit templates for this blog.</p>'); 62 62 } … … 83 83 require_once('admin-header.php'); 84 84 85 if ($user_level <= 3) {85 if ($user_level <= 5) { 86 86 die('<p>You have do not have sufficient permissions to edit templates for this blog.</p>'); 87 87 } … … 112 112 113 113 ?> 114 <?php if ('te' == $_GET['a']) : ?> 115 <div class="updated"><p>File edited successfully.</p></div> 116 <?php endif; ?> 114 117 <div class="wrap"> 115 118 <?php 116 echo "Editing <strong>$file</strong> $warning"; 117 if ('te' == $a) 118 echo "<em>File edited successfully.</em>"; 119 echo "<p>Editing <strong>$file</strong> $warning</p>"; 119 120 120 121 if (!$error) { … … 124 125 <input type="hidden" name="action" value="update" /> 125 126 <input type="hidden" name="file" value="<?php echo $file ?>" /> 126 < br />127 <p class="submit"> 127 128 <?php 128 129 if (is_writeable($real_file)) { 129 echo "<input type='submit' name='submit' value='Update File ' tabindex='2' />";130 echo "<input type='submit' name='submit' value='Update File »' tabindex='2' />"; 130 131 } else { 131 132 echo "<input type='button' name='oops' value='(You cannot update that file/template: must make it writable, e.g. CHMOD 666)' tabindex='2' />"; 132 133 } 133 134 ?> 135 </p> 134 136 </form> 135 137 <?php 136 138 } else { 137 echo '< p>Oops, no such file exists! Double check the name and try again, merci.</p>';139 echo '<div class="error"><p>Oops, no such file exists! Double check the name and try again, merci.</p></div>'; 138 140 } 139 141 ?> … … 152 154 <li><a href="templates.php?file=.htaccess">.htaccess (for rewrite rules)</a></li> 153 155 <li><a href="templates.php?file=my-hacks.php">my-hacks.php</a></li> 156 </ul> 157 <?php 158 $plugins_dir = @ dir(ABSPATH . 'wp-content/plugins'); 159 if ($plugins_dir) { 160 while(($file = $plugins_dir->read()) !== false) { 161 if ( !preg_match('|^\.+$|', $file) && preg_match('|\.php$|', $file) ) 162 $plugin_files[] = $file; 163 } 164 } 165 if ($plugins_dir || $plugin_files) : 166 ?> 167 <p>Plugin files:</p> 168 <ul> 169 <?php foreach($plugin_files as $plugin_file) : ?> 170 <li><a href="templates.php?file=wp-content/plugins/<?php echo $plugin_file; ?>"><?php echo $plugin_file; ?></a></li> 171 <?php endforeach; ?> 154 172 </ul> 155 <p>Note: of course, you can also edit the files/templates in your text editor of choice and upload them. This online editor is only meant to be used when you don't have access to a text editor or FTP client.</p> 173 <?php endif; ?> 174 <p>Note: of course, you can also edit the files/templates in your text editor of choice and upload them. This online editor is only meant to be used when you don’t have access to a text editor or FTP client.</p> 156 175 </div> 157 176 <?php
Note: See TracChangeset
for help on using the changeset viewer.