Load order fixed.

git-svn-id: http://svn.automattic.com/wordpress/trunk@5377 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
rob1n 2007-05-03 00:52:14 +00:00
parent ab530a67d5
commit f8b2a63e57
1 changed files with 6 additions and 4 deletions

View File

@ -1506,11 +1506,13 @@ function wp_parse_args( $args, $defaults = '' ) {
function wp_maybe_load_widgets() { function wp_maybe_load_widgets() {
if ( !function_exists( 'dynamic_sidebar' ) ) { if ( !function_exists( 'dynamic_sidebar' ) ) {
require_once ABSPATH . WPINC . '/widgets.php'; require_once ABSPATH . WPINC . '/widgets.php';
add_action( 'admin_head', 'wp_widgets_admin_page' );
if ( strpos( $_SERVER['REQUEST_URI'], 'wp-admin' ) !== false && isset( $GLOBALS['submenu'] ) ) {
$GLOBALS['submenu']['themes.php'][7] = array( __( 'Widgets' ), 'edit_themes', 'widgets.php' );
}
} }
} }
function wp_widgets_admin_page() {
global $submenu;
$submenu['themes.php'][7] = array( __( 'Widgets' ), 'edit_themes', 'widgets.php' );
}
?> ?>