Inventory_Presser_Customize_Dashboard::sanitize_array( array $arr )

sanitize_array


Description Description

Sanitizes every member of an array at every level with sanitize_text_field()


Top ↑

Parameters Parameters

$arr

(array) (Required)


Top ↑

Return Return

(array)


Top ↑

Source Source

File: includes/class-customize-admin-dashboard.php

	function sanitize_array( $arr )
	{
		foreach( $arr as $key => $value )
		{
			if( is_array( $value ) )
			{
				$arr[$key] = $this->sanitize_array( $value );
			}
			else
			{
				$arr[$key] = sanitize_text_field( $value );
			}
		}
		return $arr;
	}