wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



wp_recursive_ksort › WordPress Function

Od6.0.0
Przestarzałyn/a
wp_recursive_ksort ( $input_array )
Parametry:
  • (array) $input_array The array to sort, passed by reference.
    Wymagane: Tak
Zdefiniowane na:
Codex:

Sorts the keys of an array alphabetically.

The array is passed by reference so it doesn't get returned which mimics the behavior of ksort().


Źródło

function wp_recursive_ksort( &$input_array ) {
	foreach ( $input_array as &$value ) {
		if ( is_array( $value ) ) {
			wp_recursive_ksort( $value );
		}
	}

	ksort( $input_array );
}