Index: src/wp-includes/class-wp-customize-manager.php
===================================================================
--- src/wp-includes/class-wp-customize-manager.php	(revision 38577)
+++ src/wp-includes/class-wp-customize-manager.php	(working copy)
@@ -1563,7 +1563,10 @@
 	public function prepare_controls() {
 
 		$controls = array();
-		uasort( $this->controls, array( $this, '_cmp_priority' ) );
+		$this->controls = wp_list_sort( $this->controls, array(
+			'priority'        => 'ASC',
+			'instance_number' => 'ASC',
+		) );
 
 		foreach ( $this->controls as $id => $control ) {
 			if ( ! isset( $this->sections[ $control->section ] ) || ! $control->check_capabilities() ) {
@@ -1576,7 +1579,10 @@
 		$this->controls = $controls;
 
 		// Prepare sections.
-		uasort( $this->sections, array( $this, '_cmp_priority' ) );
+		$this->sections = wp_list_sort( $this->sections, array(
+			'priority'        => 'ASC',
+			'instance_number' => 'ASC',
+		) );
 		$sections = array();
 
 		foreach ( $this->sections as $section ) {
@@ -1584,8 +1590,12 @@
 				continue;
 			}
 
-			usort( $section->controls, array( $this, '_cmp_priority' ) );
 
+			$section->controls = wp_list_sort( $section->controls, array(
+				'priority'        => 'ASC',
+				'instance_number' => 'ASC',
+			) );
+
 			if ( ! $section->panel ) {
 				// Top-level section.
 				$sections[ $section->id ] = $section;
@@ -1599,7 +1609,10 @@
 		$this->sections = $sections;
 
 		// Prepare panels.
-		uasort( $this->panels, array( $this, '_cmp_priority' ) );
+		$this->panels = wp_list_sort( $this->panels, array(
+			'priority'        => 'ASC',
+			'instance_number' => 'ASC',
+		) );
 		$panels = array();
 
 		foreach ( $this->panels as $panel ) {
@@ -1607,14 +1620,20 @@
 				continue;
 			}
 
-			uasort( $panel->sections, array( $this, '_cmp_priority' ) );
+			$panel->sections = wp_list_sort( $panel->sections, array(
+				'priority'        => 'ASC',
+				'instance_number' => 'ASC',
+			) );
 			$panels[ $panel->id ] = $panel;
 		}
 		$this->panels = $panels;
 
 		// Sort panels and top-level sections together.
 		$this->containers = array_merge( $this->panels, $this->sections );
-		uasort( $this->containers, array( $this, '_cmp_priority' ) );
+		$this->containers = wp_list_sort( $this->containers, array(
+			'priority'        => 'ASC',
+			'instance_number' => 'ASC',
+		) );
 	}
 
 	/**
Index: src/wp-includes/customize/class-wp-customize-nav-menu-item-setting.php
===================================================================
--- src/wp-includes/customize/class-wp-customize-nav-menu-item-setting.php	(revision 38577)
+++ src/wp-includes/customize/class-wp-customize-nav-menu-item-setting.php	(working copy)
@@ -503,8 +503,9 @@
 		}
 
 		if ( ARRAY_A === $args['output'] ) {
-			$GLOBALS['_menu_item_sort_prop'] = $args['output_key'];
-			usort( $items, '_sort_nav_menu_items' );
+			$items = wp_list_sort( $items, array(
+				$args['output_key'] => 'ASC',
+			) );
 			$i = 1;
 
 			foreach ( $items as $k => $item ) {
Index: src/wp-includes/link-template.php
===================================================================
--- src/wp-includes/link-template.php	(revision 38577)
+++ src/wp-includes/link-template.php	(working copy)
@@ -169,7 +169,9 @@
 		if ( strpos($permalink, '%category%') !== false ) {
 			$cats = get_the_category($post->ID);
 			if ( $cats ) {
-				usort($cats, '_usort_terms_by_ID'); // order by ID
+				$cats = wp_list_sort( $cats, array(
+					'term_id' => 'ASC',
+				) );
 
 				/**
 				 * Filters the category that gets used in the %category% permalink token.
Index: src/wp-includes/nav-menu.php
===================================================================
--- src/wp-includes/nav-menu.php	(revision 38577)
+++ src/wp-includes/nav-menu.php	(working copy)
@@ -682,8 +682,9 @@
 	}
 
 	if ( ARRAY_A == $args['output'] ) {
-		$GLOBALS['_menu_item_sort_prop'] = $args['output_key'];
-		usort($items, '_sort_nav_menu_items');
+		$items = wp_list_sort( $items, array(
+			$args['output_key'] => 'ASC',
+		) );
 		$i = 1;
 		foreach ( $items as $k => $item ) {
 			$items[$k]->{$args['output_key']} = $i++;
@@ -772,7 +773,7 @@
 
 				$menu_item->type_label = __( 'Post Type Archive' );
 				$post_content = wp_trim_words( $menu_item->post_content, 200 );
-				$post_type_description = '' == $post_content ? $post_type_description : $post_content; 
+				$post_type_description = '' == $post_content ? $post_type_description : $post_content;
 				$menu_item->url = get_post_type_archive_link( $menu_item->object );
 			} elseif ( 'taxonomy' == $menu_item->type ) {
 				$object = get_taxonomy( $menu_item->object );
