Admin revamp.
git-svn-id: http://svn.automattic.com/wordpress/trunk@1089 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f81987a2f2
commit
cf39553b79
|
@ -49,7 +49,7 @@ for ($i=0; $i<count($wpvarstoreset); $i += 1) {
|
|||
}
|
||||
}
|
||||
|
||||
if ($standalone == 0) {
|
||||
if ($standalone == 0) :
|
||||
|
||||
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
|
@ -141,7 +141,6 @@ if ($profile==0) {
|
|||
include('menu.php');
|
||||
}
|
||||
?>
|
||||
<h2><?php echo $title; ?></h2>
|
||||
<?php
|
||||
} // endif not standalone
|
||||
endif;
|
||||
?>
|
|
@ -57,7 +57,7 @@ case 'update':
|
|||
$standalone = 1;
|
||||
require_once("admin-header.php");
|
||||
|
||||
if ($user_level < 3) {
|
||||
if ($user_level < 5) {
|
||||
die('<p>You have do not have sufficient permissions to edit templates for this blog.</p>');
|
||||
}
|
||||
|
||||
|
@ -82,7 +82,7 @@ default:
|
|||
|
||||
require_once('admin-header.php');
|
||||
|
||||
if ($user_level <= 3) {
|
||||
if ($user_level <= 5) {
|
||||
die('<p>You have do not have sufficient permissions to edit templates for this blog.</p>');
|
||||
}
|
||||
|
||||
|
@ -111,11 +111,12 @@ default:
|
|||
}
|
||||
|
||||
?>
|
||||
<?php if ('te' == $_GET['a']) : ?>
|
||||
<div class="updated"><p>File edited successfully.</p></div>
|
||||
<?php endif; ?>
|
||||
<div class="wrap">
|
||||
<?php
|
||||
echo "Editing <strong>$file</strong> $warning";
|
||||
if ('te' == $a)
|
||||
echo "<em>File edited successfully.</em>";
|
||||
echo "<p>Editing <strong>$file</strong> $warning</p>";
|
||||
|
||||
if (!$error) {
|
||||
?>
|
||||
|
@ -123,18 +124,19 @@ default:
|
|||
<textarea cols="80" rows="20" style="width:100%; font-family: 'Courier New', Courier, monopace; font-size:small;" name="newcontent" tabindex="1"><?php echo $content ?></textarea>
|
||||
<input type="hidden" name="action" value="update" />
|
||||
<input type="hidden" name="file" value="<?php echo $file ?>" />
|
||||
<br />
|
||||
<p class="submit">
|
||||
<?php
|
||||
if (is_writeable($real_file)) {
|
||||
echo "<input type='submit' name='submit' value='Update File' tabindex='2' />";
|
||||
echo "<input type='submit' name='submit' value='Update File »' tabindex='2' />";
|
||||
} else {
|
||||
echo "<input type='button' name='oops' value='(You cannot update that file/template: must make it writable, e.g. CHMOD 666)' tabindex='2' />";
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
</form>
|
||||
<?php
|
||||
} else {
|
||||
echo '<p>Oops, no such file exists! Double check the name and try again, merci.</p>';
|
||||
echo '<div class="error"><p>Oops, no such file exists! Double check the name and try again, merci.</p></div>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
@ -151,8 +153,25 @@ default:
|
|||
<li><a href="templates.php?file=wp-comments-popup.php">Popup comments </a></li>
|
||||
<li><a href="templates.php?file=.htaccess">.htaccess (for rewrite rules)</a></li>
|
||||
<li><a href="templates.php?file=my-hacks.php">my-hacks.php</a></li>
|
||||
</ul>
|
||||
<?php
|
||||
$plugins_dir = @ dir(ABSPATH . 'wp-content/plugins');
|
||||
if ($plugins_dir) {
|
||||
while(($file = $plugins_dir->read()) !== false) {
|
||||
if ( !preg_match('|^\.+$|', $file) && preg_match('|\.php$|', $file) )
|
||||
$plugin_files[] = $file;
|
||||
}
|
||||
}
|
||||
if ($plugins_dir || $plugin_files) :
|
||||
?>
|
||||
<p>Plugin files:</p>
|
||||
<ul>
|
||||
<?php foreach($plugin_files as $plugin_file) : ?>
|
||||
<li><a href="templates.php?file=wp-content/plugins/<?php echo $plugin_file; ?>"><?php echo $plugin_file; ?></a></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<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>
|
||||
<?php endif; ?>
|
||||
<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>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
|
|
|
@ -197,11 +197,7 @@ textarea, input, select {
|
|||
font-weight: bold;
|
||||
}
|
||||
|
||||
#adminmenu .last, #adminmenu2 .last {
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
#adminmenu a, #adminmenu2 a {
|
||||
#adminmenu a {
|
||||
border: 1px solid #fff;
|
||||
color: #333;
|
||||
font-size: 16px;
|
||||
|
@ -211,7 +207,25 @@ textarea, input, select {
|
|||
text-decoration: none;
|
||||
}
|
||||
|
||||
#adminmenu a:hover, .current, #adminmenu2 a:hover {
|
||||
#adminmenu2 a {
|
||||
border: none;
|
||||
color: #fff;
|
||||
font-size: 16px;
|
||||
font-weight: normal;
|
||||
margin: 0;
|
||||
padding: 3px 5px;
|
||||
text-decoration: none;
|
||||
}
|
||||
#adminmenu2 a:hover {
|
||||
background-color: #f0f0f0;
|
||||
color: black;
|
||||
}
|
||||
#adminmenu2 .current {
|
||||
background-color: #fff;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
#adminmenu a:hover, .current {
|
||||
background: #eaeaea;
|
||||
border: 1px solid #9d9d9d;
|
||||
color: #171717;
|
||||
|
@ -224,19 +238,24 @@ textarea, input, select {
|
|||
text-align: center;
|
||||
}
|
||||
|
||||
#adminmenu, #adminmenu2 {
|
||||
border-bottom: 2px solid #5a5a5a;
|
||||
margin: 2px;
|
||||
#adminmenu {
|
||||
border-bottom: 2px solid #707070;
|
||||
margin: 2px 2px 0 2px;
|
||||
padding: 0 2px;
|
||||
}
|
||||
|
||||
#adminmenu2 {
|
||||
margin: 0 2px;
|
||||
padding: 0;
|
||||
border-bottom: none;
|
||||
margin-left: 7px;
|
||||
background-color: #707070;
|
||||
}
|
||||
#adminmenu2 li {
|
||||
line-height: 1.7em;
|
||||
}
|
||||
|
||||
#adminmenu2 a {
|
||||
font-size: 14px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
#categorydiv {
|
||||
|
|
Loading…
Reference in New Issue