This method has been deprecated. Use WP_Customize_Nav_Menu_Setting::filter_wp_get_nav_menus() instead.

WP_Customize_Nav_Menu_Setting::_sort_menus_by_orderby( object $menu1, object $menu2 )

Sort menu objects by the class-supplied orderby property.


Description

This is a workaround for a lack of closures.

See also


Parameters

$menu1

(Required)

$menu2

(Required)


Return

(int)


Source

File: wp-includes/customize/class-wp-customize-nav-menu-setting.php

	protected function _sort_menus_by_orderby( $menu1, $menu2 ) {
		_deprecated_function( __METHOD__, 'WP-4.7.0', 'wp_list_sort' );

		$key = $this->_current_menus_sort_orderby;
		return strcmp( $menu1->$key, $menu2->$key );
	}


Changelog

Changelog
Version Description
WP-4.7.0 Use wp_list_sort()
WP-4.3.0 Introduced. This method has been deprecated. Use WP_Customize_Nav_Menu_Setting::filter_wp_get_nav_menus() instead.