Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Converting mps to knots with the Awesome Weather Widget Free Plugin
function hg_awesome_weather_wind_speed( $data, $speed, $direction )
{
$data['speed'] = round($data['speed'] * 1.94384);
$data['text'] = " knots";
return $data;
}
add_filter('awesome_weather_wind_speed', 'hg_awesome_weather_wind_speed', 10, 3);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment