_sort_priority_callback( array $a, array $b )

Sort Priority Callback Function


Description Description


Parameters Parameters

$a

(Required) Comparison A.

$b

(Required) Comparison B.


Top ↑

Return Return

(bool)


Top ↑

Source Source

File: includes/wc-template-functions.php

			function _sort_priority_callback( $a, $b ) {
				if ( ! isset( $a['priority'], $b['priority'] ) || $a['priority'] === $b['priority'] ) {
					return 0;
				}
				return ( $a['priority'] < $b['priority'] ) ? -1 : 1;
			}

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.