WordPress at a glance
function is not described

WP_Customize_Manager::_cmp_priority() protected WP 3.4.0

Deprecated from version 4.7.0. It is no longer supported and can be removed in future releases. Use wp_list_sort() instead.

Helper function to compare two objects by priority, ensuring sort stability via instance_number.

{} It's a method of the class: WP_Customize_Manager{}

No Hooks.

Return

Int. Nothing.

Usage

// protected - for code of main (parent) or child class
$result = $this->_cmp_priority( $a, $b );
$a(WP_Customize_Panel|WP_Customize_Section|WP_Customize_Control) (required)
Object A.
$b(WP_Customize_Panel|WP_Customize_Section|WP_Customize_Control) (required)
Object B.

Changelog

Since 3.4.0 Introduced.
Deprecated Since 4.7.0 Use wp_list_sort()

Code of WP_Customize_Manager::_cmp_priority() WP 5.7.2

<?php
protected function _cmp_priority( $a, $b ) {
	_deprecated_function( __METHOD__, '4.7.0', 'wp_list_sort' );

	if ( $a->priority === $b->priority ) {
		return $a->instance_number - $b->instance_number;
	} else {
		return $a->priority - $b->priority;
	}
}