wp_kses_array_lc() WordPress Function
The wp_kses_array_lc() function is used to lowercase the contents of an array. This is useful for ensuring that case-sensitive data is handled consistently.
wp_kses_array_lc( array $inarray ) #
Converts the keys of an array to lowercase.
Contents
Parameters
- $inarray
(array)(Required)Unfiltered array.
Return
(array) Fixed array with all lowercase keys.
Source
File: wp-includes/kses.php
function wp_kses_array_lc( $inarray ) { $outarray = array(); foreach ( (array) $inarray as $inkey => $inval ) { $outkey = strtolower( $inkey ); $outarray[ $outkey ] = array(); foreach ( (array) $inval as $inkey2 => $inval2 ) { $outkey2 = strtolower( $inkey2 ); $outarray[ $outkey ][ $outkey2 ] = $inval2; } } return $outarray; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
1.0.0 | Introduced. |