WordPress.org

Make WordPress Core

Ticket #21777: 21777.patch

File 21777.patch, 1.4 KB (added by SergeyBiryukov, 3 years ago)
  • wp-admin/nav-menus.php

     
    2222if ( ! current_user_can('edit_theme_options') ) 
    2323        wp_die( __( 'Cheatin’ uh?' ) ); 
    2424 
    25 // jQuery 
    26 wp_enqueue_script( 'jquery-ui-draggable' ); 
    27 wp_enqueue_script( 'jquery-ui-droppable' ); 
    28 wp_enqueue_script( 'jquery-ui-sortable' ); 
    29  
    3025// Nav Menu functions 
    3126wp_enqueue_script( 'nav-menu' ); 
    3227 
    33 // Metaboxes 
    34 wp_enqueue_script( 'common' ); 
    35 wp_enqueue_script( 'wp-lists' ); 
    36 wp_enqueue_script( 'postbox' ); 
    37  
    3828if ( wp_is_mobile() ) 
    3929        wp_enqueue_script( 'jquery-touch-punch' ); 
    4030 
  • wp-includes/script-loader.php

     
    434434                ) ); 
    435435 
    436436                // Navigation Menus 
    437                 $scripts->add( 'nav-menu', "/wp-admin/js/nav-menu$suffix.js", array('jquery-ui-sortable') ); 
     437                $scripts->add( 'nav-menu', "/wp-admin/js/nav-menu$suffix.js", array( 'jquery-ui-sortable', 'jquery-ui-draggable', 'jquery-ui-droppable', 'wp-lists', 'postbox' ) ); 
    438438                did_action( 'init' ) && $scripts->localize( 'nav-menu', 'navMenuL10n', array( 
    439439                        'noResultsFound' => _x('No results found.', 'search results'), 
    440440                        'warnDeleteMenu' => __( "You are about to permanently delete this menu. \n 'Cancel' to stop, 'OK' to delete." ),