mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-17 08:05:21 +01:00
b6aa1f6807
git-svn-id: http://svn.automattic.com/wordpress/trunk@956 1a063a9b-81f0-0310-95a4-ce76da25c4cd
28 lines
1.2 KiB
PHP
28 lines
1.2 KiB
PHP
|
|
<ul id="adminmenu">
|
|
<?php
|
|
$menu = file('./menu.txt');
|
|
$continue = true;
|
|
foreach ($menu as $item) {
|
|
$class = '';
|
|
$item = trim($item);
|
|
if ('***' == $item) $continue = false;
|
|
if ($continue) {
|
|
$item = explode("\t", $item);
|
|
// 0 = user level, 1 = file, 2 = name
|
|
$self = str_replace('/wp-admin/', '', $PHP_SELF);
|
|
if ((substr($self, -20) == substr($item[1], -20) && empty($parent_file)) || ($parent_file && ($item[1] == $parent_file))) $class = ' class="current"';
|
|
if ($user_level >= $item[0]) {
|
|
if (('upload.php' == $item[1] && get_settings('use_fileupload') && ($user_level >= get_settings('fileupload_minlevel'))
|
|
&& (in_array($user_login, explode(' ', $allowed_users)) || (trim(get_settings('fileupload_allowedusers'))==''))) || 'upload.php' != $item[1])
|
|
echo "\n\t<li><a href='{$item[1]}'$class>{$item[2]}</a></li>";
|
|
}
|
|
}
|
|
}
|
|
|
|
?>
|
|
<li><a href="<?php echo get_settings('siteurl') . '/' . get_settings('blogfilename'); ?>" title="View your site">View site</a></li>
|
|
<li class="last"><a href="<?php echo get_settings('siteurl')
|
|
?>/wp-login.php?action=logout" title="Logout of this account">Logout (<?php echo stripslashes($user_nickname) ?>)</a></li>
|
|
</ul>
|