stuartduff
2/6/2013 - 2:24 AM

Basic function that loops through the woothemes framework options array

Basic function that loops through the woothemes framework options array

function woo_options_add($options){
  $i = 0;
	while(list($key, $value) = each($options))
	{
		if($value['name'] == 'Header Padding Left/Right')
		{
			$array[$i] = $value;
			$i++;
			$array[$i] = array( "name" => __( 'Site Title Visibility', 'woothemes' ),
					"desc" => __( 'Hide the site title within the header.', 'woothemes' ),
					"id" => $shortname."_title_visibility",
					"std" => '',
					"type" => "checkbox");
		}
		elseif($value['name'] == 'Site Title Font Style')
		{
			$array[$i] = $value;
			$i++;
			$array[$i] = array( "name" => __( 'Site Description Visibility', 'woothemes' ),
					"desc" => __( 'Hide the site description within the header.', 'woothemes' ),
					"id" => $shortname."_description_visibility",
					"std" => '',
					"type" => "checkbox");
		}
		else
		{
			$array[$i] = $value;
		}		
		$i++;
	}
   
    return $array;
}