diff --git a/wp-admin/nav-menus.php b/wp-admin/nav-menus.php index 6b4b032389..e981575a30 100644 --- a/wp-admin/nav-menus.php +++ b/wp-admin/nav-menus.php @@ -22,19 +22,8 @@ if ( ! current_theme_supports( 'menus' ) && ! current_theme_supports( 'widgets' if ( ! current_user_can('edit_theme_options') ) wp_die( __( 'Cheatin’ uh?' ) ); -// jQuery -wp_enqueue_script( 'jquery-ui-draggable' ); -wp_enqueue_script( 'jquery-ui-droppable' ); -wp_enqueue_script( 'jquery-ui-sortable' ); - -// Nav Menu functions wp_enqueue_script( 'nav-menu' ); -// Metaboxes -wp_enqueue_script( 'common' ); -wp_enqueue_script( 'wp-lists' ); -wp_enqueue_script( 'postbox' ); - if ( wp_is_mobile() ) wp_enqueue_script( 'jquery-touch-punch' ); diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php index b7feb790a7..93fd2f7556 100644 --- a/wp-includes/script-loader.php +++ b/wp-includes/script-loader.php @@ -434,7 +434,7 @@ function wp_default_scripts( &$scripts ) { ) ); // Navigation Menus - $scripts->add( 'nav-menu', "/wp-admin/js/nav-menu$suffix.js", array('jquery-ui-sortable') ); + $scripts->add( 'nav-menu', "/wp-admin/js/nav-menu$suffix.js", array( 'jquery-ui-sortable', 'jquery-ui-draggable', 'jquery-ui-droppable', 'wp-lists', 'postbox' ) ); did_action( 'init' ) && $scripts->localize( 'nav-menu', 'navMenuL10n', array( 'noResultsFound' => _x('No results found.', 'search results'), 'warnDeleteMenu' => __( "You are about to permanently delete this menu. \n 'Cancel' to stop, 'OK' to delete." ),