WordPress.org

Make WordPress Core

Changeset 5400


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

Make sure Widgets menu comes after Themes. see #4169

Location:
branches/2.2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/wp-admin/menu.php

    r5376 r5400  
    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) {
  • branches/2.2/wp-includes/functions.php

    r5397 r5400  
    14911491    if ( !function_exists( 'dynamic_sidebar' ) ) {
    14921492        require_once ABSPATH . WPINC . '/widgets.php';
    1493         add_action( 'admin_head', 'wp_widgets_admin_page' );
    1494     }
    1495 }
    1496 
    1497 function wp_widgets_admin_page() {
     1493        add_action( '_admin_menu', 'wp_widgets_add_menu' );
     1494    }
     1495}
     1496
     1497function wp_widgets_add_menu() {
    14981498    global $submenu;
    14991499    $submenu['themes.php'][7] = array( __( 'Widgets' ), 'edit_themes', 'widgets.php' );
     1500    ksort($submenu['themes.php'], SORT_NUMERIC);
    15001501}
    15011502
Note: See TracChangeset for help on using the changeset viewer.