Make WordPress Core

Changeset 5401


Ignore:
Timestamp:
05/06/2007 08:36:11 PM (18 years ago)
Author:
ryan
Message:

Make sure Widgets menu comes after Themes. see #4169

Location:
trunk
Files:
2 edited

Legend:

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

    r5376 r5401  
    7070$submenu['themes.php'][10] = array(__('Theme Editor'), 'edit_themes', 'theme-editor.php');
    7171
     72do_action('_admin_menu');
     73
    7274// Create list of page plugin hook names.
    7375foreach ($menu as $menu_page) {
  • trunk/wp-includes/functions.php

    r5377 r5401  
    15071507    if ( !function_exists( 'dynamic_sidebar' ) ) {
    15081508        require_once ABSPATH . WPINC . '/widgets.php';
    1509         add_action( 'admin_head', 'wp_widgets_admin_page' );
    1510     }
    1511 }
    1512 
    1513 function wp_widgets_admin_page() {
     1509        add_action( '_admin_menu', 'wp_widgets_add_menu' );
     1510    }
     1511}
     1512
     1513function wp_widgets_add_menu() {
    15141514    global $submenu;
    15151515    $submenu['themes.php'][7] = array( __( 'Widgets' ), 'edit_themes', 'widgets.php' );
     1516    ksort($submenu['themes.php'], SORT_NUMERIC);
    15161517}
    15171518
Note: See TracChangeset for help on using the changeset viewer.