diff options
| author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2005-07-13 16:52:09 +0000 |
|---|---|---|
| committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2005-07-13 16:52:09 +0000 |
| commit | 151e726b7bb00a3f46a64bb10c71011bd56dca34 (patch) | |
| tree | dfea07401f0142bf57ef6ce40ae15da645e1a502 /wp-inst/wp-admin/menu-header.php | |
| parent | 28072f254cf1380fa6334e7adfc659d02eb9e436 (diff) | |
| download | wordpress-mu-151e726b7bb00a3f46a64bb10c71011bd56dca34.tar.gz wordpress-mu-151e726b7bb00a3f46a64bb10c71011bd56dca34.tar.xz wordpress-mu-151e726b7bb00a3f46a64bb10c71011bd56dca34.zip | |
Merge from WP Core, things are broken right now.
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@20 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-inst/wp-admin/menu-header.php')
| -rw-r--r-- | wp-inst/wp-admin/menu-header.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/wp-inst/wp-admin/menu-header.php b/wp-inst/wp-admin/menu-header.php index b661146..6807a9e 100644 --- a/wp-inst/wp-admin/menu-header.php +++ b/wp-inst/wp-admin/menu-header.php @@ -11,7 +11,7 @@ foreach ($menu as $item) { // 0 = name, 1 = user_level, 2 = file if (( strcmp($self, $item[2]) == 0 && empty($parent_file)) || ($parent_file && ($item[2] == $parent_file))) $class = ' class="current"'; - if ($user_level >= $item[1]) { + if ( current_user_can($item[1]) ) { if ( file_exists(ABSPATH . "wp-content/plugins/{$item[2]}") ) echo "\n\t<li><a href='" . get_settings('siteurl') . "/wp-admin/admin.php?page={$item[2]}'$class>{$item[0]}</a></li>"; else @@ -31,9 +31,8 @@ if ( isset($submenu["$parent_file"]) ) : <ul id="adminmenu2"> <?php foreach ($submenu["$parent_file"] as $item) : - if ($user_level < $item[1]) { + if ( !current_user_can($item[1]) ) continue; - } if ( isset($submenu_file) ) { if ( $submenu_file == $item[2] ) $class = ' class="current"'; @@ -55,4 +54,4 @@ endforeach; ?> </ul> -<?php endif; ?>
\ No newline at end of file +<?php endif; ?> |
