wpseek.com
A WordPress-centric search engine for devs and theme authors



wp_kses_array_lc › WordPress Function

Since1.0.0
Deprecatedn/a
wp_kses_array_lc ( $inarray )
Parameters:
  • (array) $inarray Unfiltered array.
    Required: Yes
Returns:
  • (array) Fixed array with all lowercase keys.
Defined at:
Codex:

Converts the keys of an array to lowercase.



Source

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;
}