WordPress开发者和主题制作者的搜索引擎



wp_kses_array_lc ›

Since1.0.0
已弃用n/a
wp_kses_array_lc ( $inarray )
参数:
  • (array) $inarray Unfiltered array.
    Required: Yes
返回:
  • (array) Fixed array with all lowercase keys.
定义在:
文档:

Converts the keys of an array to lowercase.



源码

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