From c30d0f3c579ff35dbf721daee368ee8d0b2ee7d5 Mon Sep 17 00:00:00 2001 From: rob1n Date: Thu, 3 May 2007 00:52:14 +0000 Subject: [PATCH] Load order fixed. git-svn-id: https://develop.svn.wordpress.org/trunk@5377 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/functions.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index e163cd7978..1a1651cc14 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -1506,11 +1506,13 @@ function wp_parse_args( $args, $defaults = '' ) { function wp_maybe_load_widgets() { if ( !function_exists( 'dynamic_sidebar' ) ) { require_once ABSPATH . WPINC . '/widgets.php'; - - if ( strpos( $_SERVER['REQUEST_URI'], 'wp-admin' ) !== false && isset( $GLOBALS['submenu'] ) ) { - $GLOBALS['submenu']['themes.php'][7] = array( __( 'Widgets' ), 'edit_themes', 'widgets.php' ); - } + add_action( 'admin_head', 'wp_widgets_admin_page' ); } } +function wp_widgets_admin_page() { + global $submenu; + $submenu['themes.php'][7] = array( __( 'Widgets' ), 'edit_themes', 'widgets.php' ); +} + ?> \ No newline at end of file