Skip to content

Instantly share code, notes, and snippets.

@halgatewood
Created November 8, 2017 03:38
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save halgatewood/d9704f3df5db98257ca20fccb5ee446b to your computer and use it in GitHub Desktop.
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