diff options
| author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2005-08-08 16:08:52 +0000 |
|---|---|---|
| committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2005-08-08 16:08:52 +0000 |
| commit | e803779a9219e31c4f5705f6dbf40cf503b83b2f (patch) | |
| tree | f3727e140bcb108e2c03a36400b263e1989d541a /wp-inst/wp-admin/menu.php | |
| parent | 8f31d8af4fc2c240363959c45ff893a70a87934f (diff) | |
| download | wordpress-mu-e803779a9219e31c4f5705f6dbf40cf503b83b2f.tar.gz wordpress-mu-e803779a9219e31c4f5705f6dbf40cf503b83b2f.tar.xz wordpress-mu-e803779a9219e31c4f5705f6dbf40cf503b83b2f.zip | |
Add Menu Backend options so backend pages can be disabled site-wide.
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@141 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-inst/wp-admin/menu.php')
| -rw-r--r-- | wp-inst/wp-admin/menu.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/wp-inst/wp-admin/menu.php b/wp-inst/wp-admin/menu.php index 6dc7b6f..2f0d353 100644 --- a/wp-inst/wp-admin/menu.php +++ b/wp-inst/wp-admin/menu.php @@ -4,12 +4,18 @@ // Menu item name // The minimum level the user needs to access the item: between 0 and 10 // The URL of the item's file + +$menu_perms = get_site_option( "menu_items" ); +if( is_array( $menu_perms ) == false ) + $menu_perms = array(); + $menu[0] = array(__('Dashboard'), 'read', 'index.php'); $menu[5] = array(__('Write'), 'edit_posts', 'post.php'); $menu[10] = array(__('Manage'), 'edit_posts', 'edit.php'); $menu[20] = array(__('Links'), 'manage_links', 'link-manager.php'); $menu[25] = array(__('Presentation'), 'switch_themes', 'themes.php'); -#$menu[30] = array(__('Plugins'), 'activate_plugins', 'plugins.php'); +if( $menu_perms[ 'plugins' ] == 1 ) + $menu[30] = array(__('Plugins'), 'activate_plugins', 'plugins.php'); if ( current_user_can('edit_users') ) $menu[35] = array(__('Users'), 'read', 'profile.php'); else @@ -49,8 +55,6 @@ $submenu['options-personal.php'][10] = array(__('General'), 'manage_options', 'o $submenu['options-personal.php'][15] = array(__('Writing'), 'manage_options', 'options-writing.php'); $submenu['options-personal.php'][20] = array(__('Reading'), 'manage_options', 'options-reading.php'); -#$submenu['plugins.php'][5] = array(__('Plugins'), 'activate_plugins', 'plugins.php'); - $submenu['themes.php'][5] = array(__('Themes'), 'switch_themes', 'themes.php'); if( $wpblog == 'main' && current_user_can( "level_10" ) ) { |
