Changeset 4474

Show
Ignore:
Timestamp:
11/17/06 16:22:46 (2 years ago)
Author:
matt
Message:

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

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-admin/edit-comments.php

    r4437 r4474  
    33 
    44$title = __('Edit Comments'); 
    5 $parent_file = 'edit.php'; 
     5$parent_file = 'edit-comments.php'; 
    66wp_enqueue_script( 'admin-comments' ); 
    77 
  • 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'); 
  • trunk/wp-admin/moderation.php

    r4437 r4474  
    33 
    44$title = __('Moderate comments'); 
    5 $parent_file = 'edit.php'; 
     5$parent_file = 'edit-comments.php'; 
    66wp_enqueue_script( 'admin-comments' ); 
    77