WordPress at a glance

wp_kses_array_lc() WP 1.0

Goes through an array and changes the keys to all lower case.

✈ 1 time = 0.s = speed of light | 50000 times = s = speed of light

No Hooks.

Return

Array. Fixed array with all lowercase keys.

Usage

wp_kses_array_lc( $inarray );
$inarray(array) (required)
Unfiltered array.

Code of wp kses array lc: wp-includes/kses.php WP 5.2.1

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

Related Functions

From tag: kses (html cleanup sanitize)

More from category: Helper Functions

No comments
    Hello, !     Log In . Register