To fix this:
Find this code in index.php of the plugin:
echo $args['before_widget'];
echo $args['before_title'];
echo $settings['m1mw_widget_title'];
echo $args['after_title'];
if ($m1mw_data->error ===false) {
echo '<div class="wi wi-owm-' . $m1mw_data->weather[0]->id .'" title="' . $m1mw_data->weather[0]->description . '" style="font-size: 2em;' . $m1mw_fontColor . '">
<span class="m1mw_temp">' . $m1mw_data->tempC . '°</span>
Replace with:
if ($settings['m1mw_value'] == 'C') {
$m1mw_data->temp = $m1mw_data->tempC;
}
else {
$m1mw_data->temp = $m1mw_data->tempF;
}
echo $args['before_widget'];
echo $args['before_title'];
echo $settings['m1mw_widget_title'];
echo $args['after_title'];
if ($m1mw_data->error ===false) {
echo '<div class="wi wi-owm-' . $m1mw_data->weather[0]->id .'" title="' . $m1mw_data->weather[0]->description . '" style="font-size: 2em;' . $m1mw_fontColor . '">
<span class="m1mw_temp">' . $m1mw_data->temp . '°</span>
You can find the index file in /wp-content/plugins/m1miniweather/
Note: If you modify the plugin, it will be overwritten with newer versions. Hopefully the author can implement this code.
-
This reply was modified 7 years, 2 months ago by flome. Reason: Added full code snippet