Make WordPress Core


Ignore:
Timestamp:
11/17/2006 04:22:46 PM (18 years ago)
Author:
matt
Message:

Create a new comments top-level menu and move things under it

File:
1 edited

Legend:

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

    r4289 r4474  
    1515else
    1616    $menu[10] = array(__('Manage'), 'edit_posts', 'edit.php');
    17 
     17   
     18$menu[15] = array(__('Comments'), 'edit_posts', 'edit-comments.php');
    1819$menu[20] = array(__('Blogroll'), 'manage_links', 'link-manager.php');
    1920$menu[25] = array(__('Presentation'), 'switch_themes', 'themes.php');
     
    2930$submenu['post-new.php'][10] = array(__('Write Page'), 'edit_pages', 'page-new.php');
    3031
     32$submenu['edit-comments.php'][5] = array(__('Comments'), 'edit_posts', 'edit-comments.php');
     33$awaiting_mod = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '0'");
     34$submenu['edit-comments.php'][25] = array(sprintf(__("Awaiting Moderation (%s)"), "<span id='awaitmod'>$awaiting_mod</span>"), 'edit_posts', 'moderation.php');
     35
     36
    3137$submenu['edit.php'][5] = array(__('Posts'), 'edit_posts', 'edit.php');
    3238$submenu['edit.php'][10] = array(__('Pages'), 'edit_pages', 'edit-pages.php');
    3339$submenu['edit.php'][12] = array(__('Uploads'), 'upload_files', 'upload.php');
    3440$submenu['edit.php'][15] = array(__('Categories'), 'manage_categories', 'categories.php');
    35 $submenu['edit.php'][20] = array(__('Comments'), 'edit_posts', 'edit-comments.php');
    36 $awaiting_mod = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '0'");
    37 $submenu['edit.php'][25] = array(sprintf(__("Awaiting Moderation (%s)"), "<span id='awaitmod'>$awaiting_mod</span>"), 'edit_posts', 'moderation.php');
    3841$submenu['edit.php'][30] = array(__('Files'), 'edit_files', 'templates.php');
    3942$submenu['edit.php'][35] = array(__('Import'), 'import', 'import.php');
Note: See TracChangeset for help on using the changeset viewer.