Automattic\WooCommerce\Internal\Admin\Settings

Utils::order_map_normalize()public staticWC 1.0

Normalize an order map.

Sort the order map by the order and ensure the order values start from 0 and are consecutive.

Метод класса: Utils{}

Хуков нет.

Возвращает

Массив. The normalized order map.

Использование

$result = Utils::order_map_normalize( $order_map ): array;
$order_map(массив) (обязательный)
The order map.

Код Utils::order_map_normalize() WC 9.6.1

public static function order_map_normalize( array $order_map ): array {
	asort( $order_map );

	return array_flip( array_keys( $order_map ) );
}