-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
89 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
/** | ||
* Generic helper functions. | ||
* | ||
* @package WordPress | ||
* @since 6.0.0 | ||
*/ | ||
|
||
if ( ! function_exists( 'wp_recursive_ksort' ) ) { | ||
/** | ||
* Sorts the keys of an array alphabetically. | ||
* The array is passed by reference so it doesn't get returned | ||
* which mimics the behaviour of ksort. | ||
* | ||
* @since 6.0.0 | ||
* | ||
* @param array $array The array to sort, passed by reference. | ||
*/ | ||
function wp_recursive_ksort( &$array ) { | ||
foreach ( $array as &$value ) { | ||
if ( is_array( $value ) ) { | ||
wp_recursive_ksort( $value ); | ||
} | ||
} | ||
ksort( $array ); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters