public static function sanitize_recursive( $values, $sanitizer ) {
		if ( ! is_array( $values ) ) {
			return is_scalar( $values ) ? $sanitizer( $values ) : $values;
		}

		foreach ( $values as $key => $value ) {
			if ( is_array( $value ) ) {
				$values[ $key ] = static::sanitize_recursive( $value, $sanitizer );
			} else {
				$values[ $key ] = is_scalar( $value ) ? $sanitizer( $value ) : $value;
			}
		}

		return $values;
	}
public static function sanitize_recursive( $values, $sanitizer ) {
		if ( ! is_array( $values ) ) {
			return is_scalar( $values ) ? $sanitizer( $values ) : $values;
		}

		foreach ( $values as $key => $value ) {
			if ( is_array( $value ) ) {
				$values[ $key ] = static::sanitize_recursive( $value, $sanitizer );
			} else {
				$values[ $key ] = is_scalar( $value ) ? $sanitizer( $value ) : $value;
			}
		}

		return $values;
	}
public static function sanitize_recursive ( $ values , $ sanitizer ) { if ( ! is_array ( $ values ) ) { return is_scalar ( $ values ) ? $ sanitizer ( $ values ) : $ values ; } foreach ( $ values as $ key => $ value ) { if ( is_array ( $ value ) ) { $ values [ $ key ] = static :: sanitize_recursive ( $ value , $ sanitizer ) ; } else { $ values [ $ key ] = is_scalar ( $ value ) ? $ sanitizer ( $ value ) : $ value ; } } return $ values ; }
Recursive sanitize a given values.

@param  mixed  $values    The values.
@param  string $sanitizer The sanitizer callback.
@return mixed
Recursive sanitize a given values .