Changeset 1818 for trunk/wp-admin/menu.php
- Timestamp:
- 10/19/2004 03:03:06 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/menu.php
r1810 r1818 1 2 <ul id="adminmenu">3 1 <?php 4 2 // This array constructs the admin menu bar. … … 50 48 } 51 49 52 $self = preg_replace('|^.*/wp-admin/|i', '', $_SERVER['PHP_SELF']);53 $self = preg_replace('|^.*/plugins/|i', '', $self);54 55 if (!isset($parent_file)) $parent_file = '';56 foreach ($menu as $item) {57 $class = '';58 59 // 0 = name, 1 = user_level, 2 = file60 if ((substr($self, -10) == substr($item[2], -10) && empty($parent_file)) || ($parent_file && ($item[2] == $parent_file))) $class = ' class="current"';61 62 if ($user_level >= $item[1]) {63 if (64 ('upload.php' == $item[2] &&65 get_settings('use_fileupload') &&66 ($user_level >= get_settings('fileupload_minlevel'))67 ) || 'upload.php' != $item[2])68 echo "\n\t<li><a href='" . get_settings('siteurl') . "/wp-admin/{$item[2]}'$class>{$item[0]}</a></li>";69 }70 }71 72 50 ?> 73 <li class="last"><a href="<?php echo get_settings('siteurl')74 ?>/wp-login.php?action=logout" title="<?php _e('Log out of this account') ?>"><?php printf(__('Logout (%s)'), $user_nickname) ?></a></li>75 </ul>76 77 <?php78 // Sub-menu79 if ( isset($submenu["$parent_file"]) ) :80 ?>81 <ul id="adminmenu2">82 <?php83 foreach ($submenu["$parent_file"] as $item) :84 if ($user_level < $item[1]) {85 continue;86 }87 88 if ( substr($self, -10) == substr($item[2], -10) ) $class = ' class="current"';89 else $class = '';90 echo "\n\t<li><a href='" . get_settings('siteurl') . "/wp-admin/{$item[2]}'$class>{$item[0]}</a></li>";91 endforeach;92 ?>93 94 </ul>95 <?php endif; ?>
Note: See TracChangeset
for help on using the changeset viewer.