function _yr_verdata_get_temp in Yr Weatherdata 6
Helper function to create temperature data.
2 calls to _yr_verdata_get_temp()
- theme_yr_verdata_location_block in ./
yr_verdata.module - theme_yr_verdata_location_page in ./
yr_verdata.module - Theming of a page with detailed forecast for a location.
File
- ./
yr_verdata.module, line 873 - yr_verdata.module This file provides the yr_verdata forecast module.
Code
function _yr_verdata_get_temp($tab) {
$temp = array();
$temp['val'] = check_plain($tab->temperature['value']) . '°';
$temp['val'] .= $tab->temperature['unit'] == 'celcius' ? 'C' : 'F';
$temp['class'] = (int) $tab->temperature['value'] >= 0 ? 'plus' : 'minus';
return $temp;
}