WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/14/2008 10:44:56 PM (13 years ago)
Author:
ryan
Message:

Menu fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/menu.php

    r9176 r9178  
    2525$awaiting_mod = $awaiting_mod->moderated;
    2626
    27 $menu[0] = array( __('Dashboard'), 'read', 'index.php', 'wp-menu-open', 'menu-dashboard', 'images/menu/home.png' );
     27$menu[0] = array( __('Dashboard'), 'read', 'index.php', '', 'wp-menu-open', 'menu-dashboard', 'images/menu/home.png' );
    2828    $submenu['index.php'][5]  = array( __('Dashboard'), 'read' , 'index.php' );
    2929
    30 $menu[4] = array( '', 'read', '', 'wp-menu-separator' );
     30$menu[4] = array( '', 'read', '', '', 'wp-menu-separator' );
    3131
    32 $menu[5] = array( __('Posts'), 'edit_posts', 'post-new.php', 'wp-menu-open', 'menu-posts', 'images/menu/posts.png' );
     32$menu[5] = array( __('Posts'), 'edit_posts', 'post-new.php', '', 'wp-menu-open', 'menu-posts', 'images/menu/posts.png' );
    3333    $submenu['post-new.php'][5]  = array( __('Add New'), 'edit_posts', 'post-new.php' );
    3434    //$submenu['post-new.php'][10]  = array( __('Drafts'), 'edit_posts', 'edit-post-drafts.php' );
     
    3737    $submenu['post-new.php'][25] = array( __('Categories'), 'manage_categories', 'categories.php' );
    3838
    39 $menu[10] = array( __('Media'), 'upload_files', 'media-new.php', '', 'menu-media', 'images/menu/media.png' );
     39$menu[10] = array( __('Media'), 'upload_files', 'media-new.php', '', '', 'menu-media', 'images/menu/media.png' );
    4040    $submenu['media-new.php'][5] = array( __('Add New'), 'upload_files', 'media-new.php');
    4141    $submenu['media-new.php'][10] = array( __('Edit'), 'upload_files', 'upload.php');
    4242
    43 $menu[15] = array( __('Links'), 'manage_links', 'link-add.php', '', 'menu-links', 'images/menu/links.png' );
     43$menu[15] = array( __('Links'), 'manage_links', 'link-add.php', '', '', 'menu-links', 'images/menu/links.png' );
    4444    $submenu['link-add.php'][5] = array( __('Add New'), 'manage_links', 'link-add.php' );
    4545    $submenu['link-add.php'][10] = array( __('Edit'), 'manage_links', 'link-manager.php' );
    4646    $submenu['link-add.php'][15] = array( __('Link Categories'), 'manage_categories', 'edit-link-categories.php' );
    4747
    48 $menu[20] = array( __('Pages'), 'edit_pages', 'page-new.php', '', 'menu-pages', 'images/menu/pages.png' );
     48$menu[20] = array( __('Pages'), 'edit_pages', 'page-new.php', '', '', 'menu-pages', 'images/menu/pages.png' );
    4949    $submenu['page-new.php'][5] = array( __('Add New'), 'edit_pages', 'page-new.php' );
    5050    //$submenu['page-new.php'][10] = array( __('Drafts'), 'edit_pages', 'edit-page-drafts.php' );
    5151    $submenu['page-new.php'][15] = array( __('Edit'), 'edit_pages', 'edit-pages.php' );
    5252
    53 $menu[25] = array( __('Comments'), 'edit_posts', 'edit-comments.php', '', 'menu-comments', 'images/menu/comments.png' );
     53$menu[25] = array( __('Comments'), 'edit_posts', 'edit-comments.php', '', '', 'menu-comments', 'images/menu/comments.png' );
    5454    $submenu['edit-comments.php'][15] = array( __('Comments'), 'edit_posts', 'edit-comments.php' );
    5555
    56 $menu[29] = array( '', 'read', '', 'wp-menu-separator' );
     56$menu[29] = array( '', 'read', '', '', 'wp-menu-separator' );
    5757
    58 $menu[30] = array( __('Appearance'), 'switch_themes', 'themes.php', '', 'menu-appearance', 'images/menu/appearance.png' );
     58$menu[30] = array( __('Appearance'), 'switch_themes', 'themes.php', '', '', 'menu-appearance', 'images/menu/appearance.png' );
    5959    $submenu['themes.php'][5]  = array(__('Themes'), 'switch_themes', 'themes.php');
    6060    $submenu['themes.php'][10] = array(__('Editor'), 'edit_themes', 'theme-editor.php');
    6161
    62 $menu[35] = array( __('Plugins'), 'activate_plugins', 'plugins.php', '', 'menu-plugins', 'images/menu/plugins.png' );
     62$menu[35] = array( __('Plugins'), 'activate_plugins', 'plugins.php', '', '', 'menu-plugins', 'images/menu/plugins.png' );
    6363    $submenu['plugins.php'][15] = array(__('Add New'), 'install_plugins', 'plugin-install.php');   
    6464    $submenu['plugins.php'][5]  = array( __('Installed'), 'activate_plugins', 'plugins.php' );
     
    6666
    6767if ( current_user_can('edit_users') )
    68     $menu[40] = array( __('Users'), 'edit_users', 'users.php', '', 'menu-users', 'images/menu/users.png' );
     68    $menu[40] = array( __('Users'), 'edit_users', 'users.php', '', '', 'menu-users', 'images/menu/users.png' );
    6969else
    70     $menu[40] = array( __('Profile'), 'read', 'profile.php', '', 'menu-users', 'images/menu/users.png' );
     70    $menu[40] = array( __('Profile'), 'read', 'profile.php', '', '', 'menu-users', 'images/menu/users.png' );
    7171
    7272if ( current_user_can('edit_users') ) {
     
    7979}
    8080
    81 $menu[45] = array( __('Tools'), 'manage_options', 'import.php', '', 'menu-tools', 'images/menu/tools.png' );
     81$menu[45] = array( __('Tools'), 'manage_options', 'import.php', '', '', 'menu-tools', 'images/menu/tools.png' );
    8282    $submenu['import.php'][5] = array( __('Import'), 'import', 'import.php' );
    8383    $submenu['import.php'][10] = array( __('Export'), 'import', 'export.php' );
     
    8686        $submenu['import.php'][20] = array( __('Turbo'), 'read', 'turbo.php' );
    8787
    88 $menu[50] = array( __('Settings'), 'manage_options', 'options-general.php', '', 'menu-settings', 'images/menu/settings.png' );
     88$menu[50] = array( __('Settings'), 'manage_options', 'options-general.php', '', '', 'menu-settings', 'images/menu/settings.png' );
    8989    $submenu['options-general.php'][10] = array(__('General'), 'manage_options', 'options-general.php');
    9090    $submenu['options-general.php'][15] = array(__('Writing'), 'manage_options', 'options-writing.php');
     
    163163            $_wp_menu_nopriv[$data[2]] = true;
    164164            unset($menu[$id]);
     165        } elseif ( !empty($data[0]) ) {
     166            $submenu[$data[2]][0] = $data;
    165167        }
    166168    }
Note: See TracChangeset for help on using the changeset viewer.