wp_kses_array_lc

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

Description

(array) wp_kses_array_lc( (array) $inarray ); 

Returns (array)

Fixed array with all lowercase keys

Parameters (1)

0. $inarray (array)
Unfiltered array

Usage

  1. if ( !function_exists( 'wp_kses_array_lc' ) ) { 
  2. require_once ABSPATH . WPINC . '/kses.php'; 
  3.  
  4. // Unfiltered array 
  5. $inarray = array(); 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = wp_kses_array_lc($inarray); 
  9.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/kses.php  
  1. function wp_kses_array_lc($inarray) { 
  2. $outarray = array (); 
  3.  
  4. foreach ( (array) $inarray as $inkey => $inval) { 
  5. $outkey = strtolower($inkey); 
  6. $outarray[$outkey] = array (); 
  7.  
  8. foreach ( (array) $inval as $inkey2 => $inval2) { 
  9. $outkey2 = strtolower($inkey2); 
  10. $outarray[$outkey][$outkey2] = $inval2; 
  11. } // foreach $inval 
  12. } // foreach $inarray 
  13.  
  14. return $outarray;